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