| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 3 | public function render($value) |
|
| 26 | { |
||
| 27 | 3 | if (!is_array($value) && !($value instanceof Traversable)) { |
|
| 28 | 1 | throw new Exception('Value should be an array instead of '.gettype($value)); |
|
| 29 | } |
||
| 30 | 2 | if ($value instanceof DoctrineCollection) { |
|
| 31 | 1 | $value = $value->toArray(); |
|
| 32 | } |
||
| 33 | |||
| 34 | 2 | return implode($this->options['glue'], $value); |
|
| 35 | } |
||
| 36 | |||
| 55 |