| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function __toString() |
||
| 24 | { |
||
| 25 | if (is_scalar($this->value)) { |
||
| 26 | return sprintf( |
||
| 27 | '(%s) %s', |
||
| 28 | gettype($this->value), |
||
| 29 | (string) $this->value |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | |||
| 33 | if (is_object($this->value)) { |
||
| 34 | return '(object) ' . get_class($this->value); |
||
| 35 | } |
||
| 36 | |||
| 37 | return '(' . gettype($this->value) . ')'; |
||
| 38 | } |
||
| 39 | |||
| 68 |