|
1 | | -<?php declare(strict_types = 1); |
| 1 | +<?php declare(strict_types=1); |
2 | 2 |
|
3 | 3 | namespace PHPStan\Analyser; |
4 | 4 |
|
|
19 | 19 | #[AutowiredService] |
20 | 20 | final class AnalyserResultFinalizer |
21 | 21 | { |
22 | | - |
23 | 22 | public function __construct( |
24 | 23 | private RuleRegistry $ruleRegistry, |
25 | 24 | private IgnoreErrorExtensionProvider $ignoreErrorExtensionProvider, |
@@ -57,23 +56,23 @@ public function finalize(AnalyserResult $analyserResult, bool $onlyFiles, bool $ |
57 | 56 | $tempCollectorErrors[] = (new Error($e->getMessage(), $file, $node->getStartLine(), $e, tip: $e->getTip())) |
58 | 57 | ->withIdentifier('phpstan.internal') |
59 | 58 | ->withMetadata([ |
60 | | - InternalError::STACK_TRACE_METADATA_KEY => InternalError::prepareTrace($e), |
| 59 | + InternalError::STACK_TRACE_METADATA_KEY => InternalError::prepareTrace($e), |
61 | 60 | InternalError::STACK_TRACE_AS_STRING_METADATA_KEY => $e->getTraceAsString(), |
62 | 61 | ]); |
63 | 62 | continue; |
64 | 63 | } catch (IdentifierNotFound $e) { |
65 | 64 | $tempCollectorErrors[] = (new Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, $node->getStartLine(), $e, tip: 'Learn more at https://phpstan.org/user-guide/discovering-symbols')) |
66 | 65 | ->withIdentifier('phpstan.reflection') |
67 | 66 | ->withMetadata([ |
68 | | - InternalError::STACK_TRACE_METADATA_KEY => InternalError::prepareTrace($e), |
| 67 | + InternalError::STACK_TRACE_METADATA_KEY => InternalError::prepareTrace($e), |
69 | 68 | InternalError::STACK_TRACE_AS_STRING_METADATA_KEY => $e->getTraceAsString(), |
70 | 69 | ]); |
71 | 70 | continue; |
72 | 71 | } catch (UnableToCompileNode | CircularReference $e) { |
73 | 72 | $tempCollectorErrors[] = (new Error(sprintf('Reflection error: %s', $e->getMessage()), $file, $node->getStartLine(), $e)) |
74 | 73 | ->withIdentifier('phpstan.reflection') |
75 | 74 | ->withMetadata([ |
76 | | - InternalError::STACK_TRACE_METADATA_KEY => InternalError::prepareTrace($e), |
| 75 | + InternalError::STACK_TRACE_METADATA_KEY => InternalError::prepareTrace($e), |
77 | 76 | InternalError::STACK_TRACE_AS_STRING_METADATA_KEY => $e->getTraceAsString(), |
78 | 77 | ]); |
79 | 78 | continue; |
@@ -236,5 +235,4 @@ private function addUnmatchedIgnoredErrors( |
236 | 235 | $locallyIgnoredCollectorErrors, |
237 | 236 | ); |
238 | 237 | } |
239 | | - |
240 | 238 | } |
0 commit comments