Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | 13 | public function process(array $row) |
|
30 | { |
||
31 | 13 | foreach ($row as &$item) { |
|
32 | 13 | if (is_object($item)) { |
|
33 | 4 | if (method_exists($item, '__toString')) { |
|
34 | 3 | $item = $item->__toString(); |
|
35 | 3 | } else { |
|
36 | 1 | throw new InvalidArgumentException("Supplied object does not implement __toString"); |
|
37 | } |
||
38 | 3 | } |
|
39 | 12 | } |
|
40 | |||
41 | 12 | return $row; |
|
42 | } |
||
43 | } |
||
44 |