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