website/errors/phpstan.parse.md
<?php declare(strict_types = 1);
function doFoo(): void
{
$x = ;
}
PHPStan was unable to parse the PHP file due to a syntax error. The file contains invalid PHP code that the parser cannot process. This prevents PHPStan from analysing the file at all.
This error is not ignorable because PHPStan cannot perform any analysis on a file it cannot parse.
Fix the syntax error in the PHP file. The error message includes the line number and a description of the parsing problem.
<?php declare(strict_types = 1);
function doFoo(): void
{
- $x = ;
+ $x = 1;
}
If the file intentionally contains non-standard PHP syntax (for example, a template or code snippet), exclude it from PHPStan analysis using the excludePaths configuration option.