Skip to content

Commit 38174a6

Browse files
committed
Revert "Bootstrap - autoload Roave\BetterReflection classes"
This reverts commit daec3a6.
1 parent 570b17b commit 38174a6

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

bootstrap.php

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
if (strpos($class, 'PHPStan\\PhpDocParser\\') === 0) {
2828
return;
2929
}
30-
31-
$isPhpStan = strpos($class, 'PHPStan\\') === 0;
32-
$isBetterReflection = strpos($class, 'Roave\\BetterReflection\\') === 0;
33-
if (!$isPhpStan && !$isBetterReflection) {
30+
if (strpos($class, 'PHPStan\\') !== 0) {
3431
return;
3532
}
3633

@@ -39,17 +36,8 @@
3936
}
4037

4138
$filename = str_replace('\\', DIRECTORY_SEPARATOR, $class);
42-
43-
if ($isPhpStan) {
44-
$filename = substr($filename, strlen('PHPStan\\'));
45-
$filepath = 'phar://' . __DIR__ . '/phpstan.phar/src/' . $filename . '.php';
46-
} elseif ($isBetterReflection) {
47-
$filename = substr($filename, strlen('Roave\\BetterReflection\\'));
48-
$filepath = 'phar://' . __DIR__ . '/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/' . $filename . '.php';
49-
} else {
50-
return;
51-
}
52-
39+
$filename = substr($filename, strlen('PHPStan\\'));
40+
$filepath = 'phar://' . __DIR__ . '/phpstan.phar/src/' . $filename . '.php';
5341
if (!file_exists($filepath)) {
5442
return;
5543
}

0 commit comments

Comments
 (0)