Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
27 | public function handle() |
||
28 | { |
||
29 | // get the path to composer.lock |
||
30 | $composerLock = base_path('composer.lock'); |
||
31 | 27 | ||
32 | $parser = new AdvisoryParser((new AdvisoryFetcher)->fetchAdvisories()); |
||
33 | 27 | ||
34 | $dependencies = (new Composer)->getDependencies($composerLock); |
||
35 | 27 | ||
36 | 27 | // and feed it into the AdvisoryAnalyzer |
|
37 | $checkResult = (new AdvisoryAnalyzer($parser->getAdvisories()))->analyzeDependencies($dependencies); |
||
38 | |||
39 | // then display it using the formatter provided |
||
40 | app(SimpleFormatter::class)->displayResults($this->getOutput(), $composerLock, $checkResult); |
||
41 | 6 | ||
42 | return (int) (count($checkResult) > 0); |
||
43 | } |
||
45 |