@@ 315-318 (lines=4) @@ | ||
312 | ||
313 | // single value |
|
314 | if (is_numeric($element)) { |
|
315 | if (intval($element) < self::$boundaries[$index]['min'] || |
|
316 | intval($element) > self::$boundaries[$index]['max']) { |
|
317 | throw new \Exception('value out of allowed range'); |
|
318 | } |
|
319 | ||
320 | if ($stepping !== 1) { |
|
321 | throw new \Exception('invalid combination of value and stepping notation'); |
|
@@ 340-343 (lines=4) @@ | ||
337 | // validate range |
|
338 | foreach ($ranges as $range) { |
|
339 | if (is_numeric($range)) { |
|
340 | if (intval($range) < self::$boundaries[$index]['min'] || |
|
341 | intval($range) > self::$boundaries[$index]['max']) { |
|
342 | throw new \Exception('invalid range start or end value'); |
|
343 | } |
|
344 | } else { |
|
345 | throw new \Exception('non-numeric range notation'); |
|
346 | } |