1 | <?php |
||
9 | class PhpStanLoader implements FileChecker |
||
10 | { |
||
11 | protected $lineRegex = '/^\s+(?<lineNumber>[0-9]+)/'; |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $file; |
||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $errors = []; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $errorRanges = []; |
||
26 | |||
27 | /** |
||
28 | * @param string $filename the path to the phpstan.txt file |
||
29 | */ |
||
30 | public function __construct($filename) |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function getLines() |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function isValidLine($file, $lineNumber) |
||
60 | |||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function handleNotFoundFile() |
||
69 | |||
70 | /** |
||
71 | * @param string $line |
||
72 | * @param string $currentFile |
||
73 | * @return string the currentFileName |
||
74 | */ |
||
75 | protected function checkForFilename($line, $currentFile) |
||
82 | |||
83 | protected function getLineNumber($line) |
||
92 | |||
93 | protected function getMessage($line) |
||
97 | } |
||
98 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..