Closed dvhx closed 1 year ago
Duplicate of #3693, #3491, #2930
PHPCS is often used within IDEs during live coding, so, generally speaking, it will ignore parse errors. Along the same lines, something which may be a parse error in one PHP version, may not be on another PHP version.
If you want parse errors to be reported, you can add the Generic.PHP.Syntax
sniff to your ruleset, though be aware that it will report based on the PHP version used during the PHPCS scan.
Alternatively, use a dedicated linting tool like PHP Parallel Lint or PHPLint.