| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | * @param $code |
||
| 22 | * |
||
| 23 | * @return bool |
||
| 24 | * @throws \Crossjoin\Json\Exception\InvalidArgumentException |
||
| 25 | */ |
||
| 26 | public static function validateArgument($expectedType, $argumentName, $currentValue, $code) |
||
| 27 | { |
||
| 28 | if (gettype($currentValue) !== $expectedType) { |
||
| 29 | throw new self( |
||
| 30 | sprintf( |
||
| 31 | "%s expected for argument '%s'. Got '%s'.", |
||
| 32 | ucfirst(strtolower($expectedType)), |
||
| 33 | $argumentName, |
||
| 43 |