| Conditions | 6 |
| Paths | 5 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | private static function stringify($value): ?string |
||
| 34 | { |
||
| 35 | if (null === $value) { |
||
| 36 | return null; |
||
| 37 | } |
||
| 38 | |||
| 39 | if (\is_scalar($value)) { |
||
| 40 | return $value; |
||
| 41 | } |
||
| 42 | |||
| 43 | if (\is_object($value) && \method_exists($value, '__toString')) { |
||
| 44 | return $value; |
||
| 45 | } |
||
| 46 | |||
| 47 | if (\is_object($value)) { |
||
| 48 | return '[object] '.\get_class($value); |
||
| 49 | } |
||
| 50 | |||
| 51 | return '('.\gettype($value).')'; |
||
| 52 | } |
||
| 54 |