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