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