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