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