Conditions | 6 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
47 | final protected function checkParameterType($value): void |
||
48 | { |
||
49 | if (\is_array($value)) { |
||
50 | foreach ($value as $val) { |
||
51 | $this->checkParameterType($val); |
||
52 | } |
||
53 | } elseif ($value !== null && !\is_scalar($value)) { |
||
54 | throw new InvalidScalarParameterException(\sprintf( |
||
55 | 'Class "%s" can only accept scalar payload parameters, "%s" given', |
||
56 | self::class, |
||
57 | \is_object($value) ? \get_class($value) : \gettype($value) |
||
58 | )); |
||
62 |