From da681ef5873a0ef720cb66000c8107541b8e1ad9 Mon Sep 17 00:00:00 2001 From: Mikhail Marynich Date: Mon, 17 Sep 2018 18:56:53 +0200 Subject: [PATCH] Replace `dirname(__FILE__)` by `__DIR__` --- src/PhpGitHooks/Infrastructure/Tool/ToolPathFinder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpGitHooks/Infrastructure/Tool/ToolPathFinder.php b/src/PhpGitHooks/Infrastructure/Tool/ToolPathFinder.php index 9e0e594..d2d2d31 100644 --- a/src/PhpGitHooks/Infrastructure/Tool/ToolPathFinder.php +++ b/src/PhpGitHooks/Infrastructure/Tool/ToolPathFinder.php @@ -30,7 +30,7 @@ public function find($tool) $package = $this->installedPackages[$this->tools[$tool]]; foreach ($package['bin'] as $bin) { if (preg_match("#${tool}$#", $bin)) { - return dirname(__FILE__).self::COMPOSER_VENDOR_DIR.$package['name'].DIRECTORY_SEPARATOR.$bin; + return __DIR__.self::COMPOSER_VENDOR_DIR.$package['name'].DIRECTORY_SEPARATOR.$bin; } } }