Skip to content
Permalink
Browse files

Ignore files using a stream wrapper. (#2184)

  • Loading branch information...
mglaman authored and ondrejmirtes committed Jun 10, 2019
1 parent 48fede6 commit bf4e560b898dd77e5d4b22978e5fddece3d7a364
Showing with 4 additions and 0 deletions.
  1. +3 −0 src/File/FileHelper.php
  2. +1 −0 tests/PHPStan/File/FileHelperTest.php
@@ -31,6 +31,9 @@ public function absolutizePath(string $path): string
return $path;
}
}
if (\Nette\Utils\Strings::startsWith($path, 'phar://')) {
return $path;
}
return rtrim($this->getWorkingDirectory(), '/\\') . DIRECTORY_SEPARATOR . ltrim($path, '/\\');
}
@@ -46,6 +46,7 @@ public function dataAbsolutizePathOnLinuxOrMac(): array
['users', '/abcd/users'],
['../lib', '/abcd/../lib'],
['./lib', '/abcd/./lib'],
['phar:///home/users/', 'phar:///home/users/'],
];
}

0 comments on commit bf4e560

Please sign in to comment.
You can’t perform that action at this time.