Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
85.71% |
6 / 7 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| WrappedErrorTraceList | |
85.71% |
6 / 7 |
|
50.00% |
1 / 2 |
4.05 | |
0.00% |
0 / 1 |
| offsetGet | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getFiles | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
3 | |||
| 1 | <?php |
| 2 | namespace Apie\HtmlBuilders\ErrorHandler; |
| 3 | |
| 4 | use Apie\Core\Lists\ItemList; |
| 5 | |
| 6 | final class WrappedErrorTraceList extends ItemList |
| 7 | { |
| 8 | protected bool $mutable = false; |
| 9 | |
| 10 | public function offsetGet(mixed $offset): WrappedErrorTrace |
| 11 | { |
| 12 | return parent::offsetGet($offset); |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * @return array<string, string> |
| 17 | */ |
| 18 | public function getFiles(): array |
| 19 | { |
| 20 | $result = []; |
| 21 | |
| 22 | foreach ($this as $trace) { |
| 23 | $contents = $trace->getFileContents(); |
| 24 | if ($contents !== null) { |
| 25 | $result[$trace->file] = $contents; |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | return $result; |
| 30 | } |
| 31 | } |