| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public static function check(Resource $resource) |
||
| 21 | { |
||
| 22 | foreach ($resource->properties() as $key => $value) { |
||
| 23 | if (isset($resource->ranges()[$key])) { |
||
| 24 | if ($value < $resource->ranges()[$key]['more_than']) { |
||
| 25 | throw new RuntimeException( |
||
| 26 | 'Value `' . $value . '` is out of range: ' |
||
| 27 | . '`' |
||
| 28 | . $resource->ranges()[$key]['more_than'] |
||
| 29 | . ' to ' |
||
| 30 | . $resource->ranges()[$key]['more_than'] |
||
| 31 | . '`.' |
||
| 32 | ); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 |