File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ parameters:
24
24
- '#Access to an undefined property PHP_CodeSniffer\\Config::\$standards.#'
25
25
- '#Access to an undefined property PHP_CodeSniffer\\Sniffs\\Sniff::\$#'
26
26
- '#NunoMaduro\\PhpInsights\\Application\\Console\\Formatters\\Json has an unused parameter \$input#'
27
+ - '#In method "NunoMaduro\\PhpInsights\\Domain\\File::process", caught "Throwable" must be rethrown#'
27
28
autoload_files:
28
29
- %rootDir%/../../squizlabs/php_codesniffer/autoload.php
29
30
reportUnmatchedIgnoredErrors: false
Original file line number Diff line number Diff line change @@ -111,7 +111,11 @@ public function process(): void
111
111
112
112
$ this ->reportActiveSniffClass ($ sniff );
113
113
114
- $ sniff ->process ($ this , $ stackPtr );
114
+ try {
115
+ $ sniff ->process ($ this , $ stackPtr );
116
+ } catch (\Throwable $ e ) {
117
+ $ this ->addError ('Unparsable php code: syntax error or wrong phpdocs. ' , $ stackPtr , $ token ['code ' ]);
118
+ }
115
119
}
116
120
}
117
121
You can’t perform that action at this time.
0 commit comments