Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 7 | public function getRows($items, $headers = null, $defaultIfNull = null) |
|
35 | { |
||
36 | 7 | $headers = $headers ?? $this->getHeaders($items); |
|
37 | |||
38 | 7 | $rows = []; |
|
39 | 7 | foreach($items as $item) { |
|
40 | 7 | $row = []; |
|
41 | 7 | foreach($headers as $header) { |
|
42 | 7 | $row[] = $item->getItem($header, $defaultIfNull); |
|
43 | } |
||
44 | 7 | $rows[] = $row; |
|
45 | } |
||
46 | |||
47 | 7 | return $rows; |
|
48 | } |
||
65 | } |