File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212// edge case during Rector tests case, happens when
1313// 1. phpstan autoload test case is triggered first,
1414// 2. all php-parser classes are loaded,
15- if (defined ('PHPUNIT_COMPOSER_INSTALL ' ) && isPHPStanTestPreloaded ()) {
15+ if (defined ('PHPUNIT_COMPOSER_INSTALL ' )
16+ && class_exists (PHPStanTestCase::class, false )
17+ && interface_exists (Node::class, false )) {
1618 return ;
1719}
1820
19- function isPHPStanTestPreloaded (): bool
20- {
21- if (! class_exists (PHPStanTestCase::class, false )) {
22- return false ;
23- }
24-
25- return interface_exists (Node::class, false );
26- }
27-
2821require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node.php ' ;
2922require_once __DIR__ . '/src/Contract/PhpParser/Node/StmtsAwareInterface.php ' ;
3023require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php ' ;
You can’t perform that action at this time.
0 commit comments