| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | trait AssertRangeTrait |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * @param mixed $value |
||
| 29 | * |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | abstract protected static function valueToString($value): string; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Check value is in range min..max |
||
| 36 | * |
||
| 37 | * @param int $value |
||
| 38 | * @param int $min |
||
| 39 | * @param int $max |
||
| 40 | * @param string $message |
||
| 41 | * |
||
| 42 | * @return void |
||
| 43 | * @throws InvalidArgumentException |
||
| 44 | */ |
||
| 45 | 105 | public static function assertRange(int $value, int $min, int $max, string $message = ''): void |
|
| 59 |