| Conditions | 5 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 46 | private function makeString($value) |
||
| 47 | { |
||
| 48 | if (is_scalar($value)) { |
||
| 49 | return (string)$value; |
||
| 50 | } elseif (is_null($value)) { |
||
| 51 | return ''; |
||
| 52 | } elseif (is_object($value) && method_exists($value, '__toString' )) { |
||
| 53 | return (string)$value; |
||
| 54 | } |
||
| 55 | |||
| 56 | throw new UnexpectedValueException("Unable to convert return value into string"); |
||
| 57 | } |
||
| 58 | } |
||
| 59 |