Skip to content

Commit

Permalink
Simplify usage of dirname()
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 10, 2019
1 parent 641043e commit 594cfe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Caster/LinkStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private function getComposerRoot($file, &$inVendor)
foreach (get_declared_classes() as $class) {
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
$r = new \ReflectionClass($class);
$v = \dirname(\dirname($r->getFileName()));
$v = \dirname($r->getFileName(), 2);
if (file_exists($v.'/composer/installed.json')) {
self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR;
}
Expand Down

0 comments on commit 594cfe2

Please sign in to comment.