Browse Source

chore: Cheaper file check first (#8252)

Michael Voříšek 4 months ago
parent
commit
b58891cddf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/ToolInfo.php

+ 1 - 1
src/ToolInfo.php

@@ -104,7 +104,7 @@ final class ToolInfo implements ToolInfoInterface
      */
     public function isRunInsideDocker(): bool
     {
-        return is_file('/.dockerenv') && str_starts_with(__FILE__, '/fixer/');
+        return str_starts_with(__FILE__, '/fixer/') && is_file('/.dockerenv');
     }
 
     public function getPharDownloadUri(string $version): string