Total Complexity | 3 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | 1 | final class Numbers { |
|
12 | use \Nette\StaticClass; |
||
13 | |||
14 | /** |
||
15 | * Ensure that a number is within boundaries |
||
16 | */ |
||
17 | public static function range(int $number, int $min, int $max): int { |
||
18 | 1 | return min(max($number, $min), $max); |
|
19 | } |
||
20 | |||
21 | /** |
||
22 | * Check whether a number is within boundaries |
||
23 | */ |
||
24 | public static function isInRange(int $number, int $min, int $max): bool { |
||
26 | } |
||
27 | } |
||
28 | ?> |