| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function getValue(string $field, $value) |
||
| 12 | { |
||
| 13 | $this->checkConstraints($field, $value); |
||
| 14 | |||
| 15 | foreach ($value as $scalarValue) { |
||
| 16 | if (!call_user_func('is_' . $this->type, $scalarValue)) { |
||
| 17 | throw new InvalidConstraintException(sprintf('Value "%s" is not of type %s', $scalarValue, $this->type)); |
||
| 18 | } |
||
| 19 | } |
||
| 20 | |||
| 21 | return $value; |
||
| 22 | } |
||
| 23 | } |
||
| 24 |