|
7 | 7 | use PHPStan\AnalysedCodeException;
|
8 | 8 | use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode;
|
9 | 9 | use PHPStan\BetterReflection\Reflection\Exception\CircularReference;
|
10 |
| -use PHPStan\BetterReflection\Reflection\Exception\NotAClassReflection; |
11 |
| -use PHPStan\BetterReflection\Reflection\Exception\NotAnInterfaceReflection; |
12 | 10 | use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
|
13 | 11 | use PHPStan\Collectors\CollectedData;
|
14 | 12 | use PHPStan\Collectors\Registry as CollectorRegistry;
|
@@ -104,7 +102,7 @@ public function analyseFile(
|
104 | 102 | } catch (IdentifierNotFound $e) {
|
105 | 103 | $fileErrors[] = (new Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, $node->getLine(), $e, null, null, 'Learn more at https://phpstan.org/user-guide/discovering-symbols'))->withIdentifier('phpstan.reflection');
|
106 | 104 | continue;
|
107 |
| - } catch (UnableToCompileNode | NotAClassReflection | NotAnInterfaceReflection | CircularReference $e) { |
| 105 | + } catch (UnableToCompileNode | CircularReference $e) { |
108 | 106 | $fileErrors[] = (new Error(sprintf('Reflection error: %s', $e->getMessage()), $file, $node->getLine(), $e))->withIdentifier('phpstan.reflection');
|
109 | 107 | continue;
|
110 | 108 | }
|
@@ -140,7 +138,7 @@ public function analyseFile(
|
140 | 138 | } catch (IdentifierNotFound $e) {
|
141 | 139 | $fileErrors[] = (new Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, $node->getLine(), $e, null, null, 'Learn more at https://phpstan.org/user-guide/discovering-symbols'))->withIdentifier('phpstan.reflection');
|
142 | 140 | continue;
|
143 |
| - } catch (UnableToCompileNode | NotAClassReflection | NotAnInterfaceReflection | CircularReference $e) { |
| 141 | + } catch (UnableToCompileNode | CircularReference $e) { |
144 | 142 | $fileErrors[] = (new Error(sprintf('Reflection error: %s', $e->getMessage()), $file, $node->getLine(), $e))->withIdentifier('phpstan.reflection');
|
145 | 143 | continue;
|
146 | 144 | }
|
@@ -168,7 +166,7 @@ public function analyseFile(
|
168 | 166 | // pass
|
169 | 167 | } catch (IdentifierNotFound) {
|
170 | 168 | // pass
|
171 |
| - } catch (UnableToCompileNode | NotAClassReflection | NotAnInterfaceReflection) { |
| 169 | + } catch (UnableToCompileNode) { |
172 | 170 | // pass
|
173 | 171 | }
|
174 | 172 | };
|
@@ -223,7 +221,7 @@ public function analyseFile(
|
223 | 221 | $fileErrors[] = (new Error($e->getMessage(), $file, null, $e, null, null, $e->getTip()))->withIdentifier('phpstan.internal');
|
224 | 222 | } catch (IdentifierNotFound $e) {
|
225 | 223 | $fileErrors[] = (new Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, null, $e, null, null, 'Learn more at https://phpstan.org/user-guide/discovering-symbols'))->withIdentifier('phpstan.reflection');
|
226 |
| - } catch (UnableToCompileNode | NotAClassReflection | NotAnInterfaceReflection | CircularReference $e) { |
| 224 | + } catch (UnableToCompileNode | CircularReference $e) { |
227 | 225 | $fileErrors[] = (new Error(sprintf('Reflection error: %s', $e->getMessage()), $file, null, $e))->withIdentifier('phpstan.reflection');
|
228 | 226 | }
|
229 | 227 | } elseif (is_dir($file)) {
|
|
0 commit comments