| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function value(array $data, $owner = null): int |
||
| 19 | { |
||
| 20 | $value = $this->my($data); |
||
| 21 | if (!preg_match('/^[-+]?\d+$/', (string) $value)) { |
||
| 22 | throw UnmappableProperty::itMustBeLikeAnInteger($this, $value); |
||
| 23 | } |
||
| 24 | if ($value > (string) PHP_INT_MAX || $value < (string) PHP_INT_MIN) { |
||
| 25 | throw UnmappableProperty::itMustBeInIntegerRange($this, $value); |
||
| 26 | } |
||
| 27 | return (int) $value; |
||
| 28 | } |
||
| 30 |