Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
20 | 28 | protected function initialize($offset) |
|
21 | { |
||
22 | 28 | parent::initialize($offset); |
|
23 | |||
24 | 28 | $type = $this->getType(); |
|
25 | 28 | if (!$this->isPrimitive($type) && !$this->isDeserializableType($type)) { |
|
|
|||
26 | 4 | $value = new $type($this->typeData[$offset]); |
|
27 | 4 | $this->typeData[$offset] = $value; |
|
28 | } |
||
29 | 28 | } |
|
30 | |||
63 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: