| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function run() |
||
| 17 | { |
||
| 18 | $projectDirectory = $this->aliases->get('@root'); |
||
| 19 | $debugDirectory = $this->aliases->get('@runtime/debug'); |
||
| 20 | |||
| 21 | $outputFilePath = $debugDirectory . DIRECTORY_SEPARATOR . 'psalm-report.json'; |
||
| 22 | |||
| 23 | $params = [ |
||
| 24 | 'vendor/bin/psalm', |
||
| 25 | '--report=' . $outputFilePath, |
||
| 26 | ]; |
||
| 27 | |||
| 28 | $process = new Process($params); |
||
| 29 | |||
| 30 | $process |
||
| 31 | ->setWorkingDirectory($projectDirectory) |
||
| 32 | ->setTimeout(null) |
||
| 33 | ->run(); |
||
| 34 | |||
| 35 | return json_decode( |
||
| 36 | file_get_contents($outputFilePath), |
||
| 37 | true |
||
| 38 | ); |
||
| 41 |