Conditions | 3 |
Paths | 2 |
Total Lines | 4 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 16 | protected function checkType($value): void |
|
37 | { |
||
38 | 16 | if (gettype($value) !== strtolower($this->valueType) && !$value instanceof $this->valueType) { |
|
39 | 2 | throw new \InvalidArgumentException('Value must be of type: ' . $this->valueType . " but value of type: " . gettype($value) . " given."); |
|
40 | } |
||
44 | } |