Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
17 | public function __construct(string $fieldName, TypeUtilInterface $typeUtil, $input) |
||
18 | { |
||
19 | $this->fieldName = $fieldName; |
||
20 | $type = get_debug_type($input); |
||
21 | if (is_array($input)) { |
||
22 | $type = json_encode($input); |
||
23 | } |
||
24 | $message = 'Wrong input for field "' . $fieldName . '" expect '. $typeUtil . ' got ' . $type; |
||
25 | parent::__construct(422, $message); |
||
26 | } |
||
36 |