Conditions | 5 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
30 | public function collect(): array |
||
31 | { |
||
32 | $positive = $negative = []; |
||
33 | |||
34 | \pcov\stop(); |
||
35 | |||
36 | foreach (\pcov\collect() as $file => $lines) { |
||
37 | if (!file_exists($file)) { |
||
38 | continue; |
||
39 | } |
||
40 | |||
41 | foreach ($lines as $number => $value) { |
||
42 | if ($value > 0) { |
||
43 | $positive[$file][$number] = $value; |
||
44 | } else { |
||
45 | $negative[$file][$number] = $value; |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 | |||
50 | return array_replace_recursive($negative, $positive); |
||
51 | } |
||
53 |