1 | <?php |
||
9 | class PhpStanLoader implements FileChecker |
||
10 | { |
||
11 | protected $lineRegex = '/^\s+(?<lineNumber>[0-9]+)/'; |
||
12 | |||
13 | protected $file; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $invalidLines = []; |
||
19 | |||
20 | /** |
||
21 | * @param string $filename the path to the phpstan.txt file |
||
22 | */ |
||
23 | public function __construct($filename) |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function getLines() |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function isValidLine($file, $lineNumber) |
||
59 | |||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function handleNotFoundFile() |
||
68 | |||
69 | /** |
||
70 | * @param string $line |
||
71 | * @param string $currentFile |
||
72 | * @return string the currentFileName |
||
73 | */ |
||
74 | protected function checkForFilename($line, $currentFile) |
||
81 | |||
82 | protected function getLineNumber($line, $currentLineNumber) |
||
95 | |||
96 | protected function getMessage($line) |
||
100 | |||
101 | protected function trimLines() |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | public static function getDescription() |
||
117 | } |
||
118 |