Conditions | 3 |
Paths | 3 |
Total Lines | 24 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function __invoke(array $array) |
||
33 | { |
||
34 | if (false === file_exists($this->readme)) { |
||
35 | return $array; |
||
36 | } |
||
37 | |||
38 | if (false === file_exists($this->composer)) { |
||
39 | return $array; |
||
40 | } |
||
41 | |||
42 | $json = json_decode(file_get_contents($this->composer), true); |
||
43 | |||
44 | $array[] = [ |
||
45 | 'composer' => $this->composer, |
||
46 | 'dev' => null, |
||
47 | 'direct' => null, |
||
48 | 'local' => true, |
||
49 | 'package' => $json['name'], |
||
50 | 'readme' => $this->readme, |
||
51 | 'version' => 'local', |
||
52 | ]; |
||
53 | |||
54 | return $array; |
||
55 | } |
||
56 | } |
||
57 |