Conditions | 7 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
60 | private function sameType($currentValue, $initialValue, Type $type): bool |
||
61 | { |
||
62 | if ($type instanceof NullType && $initialValue === null) { |
||
63 | return true; |
||
64 | } |
||
65 | |||
66 | if (is_scalar($initialValue) && $currentValue === $initialValue) { |
||
67 | return true; |
||
68 | } |
||
69 | |||
70 | if (is_object($initialValue) && get_class($initialValue) === get_class($currentValue)) { |
||
71 | return true; |
||
72 | } |
||
73 | |||
74 | return false; |
||
75 | } |
||
84 |