| 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 | 15 | public function process(array $row) |
|
| 30 | { |
||
| 31 | 15 | foreach ($row as &$item) { |
|
| 32 | 15 | 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 | 14 | } |
|
| 40 | |||
| 41 | 14 | return $row; |
|
| 42 | } |
||
| 43 | } |
||
| 44 |