| Conditions | 2 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | 7 | public static function assertPage(int $value, string $message = '') |
|
| 47 | { |
||
| 48 | 7 | $format = 'Page number (%s) must be in the range [%2$s..%3$s]'; |
|
| 49 | 7 | $message = sprintf($message ?: $format, |
|
| 50 | 7 | static::valueToString($value), |
|
| 51 | 7 | static::valueToString(static::$pageMin), |
|
|
|
|||
| 52 | 7 | static::valueToString(static::$pageMax)); |
|
| 53 | |||
| 54 | 7 | return static::range($value, static::$pageMin, static::$pageMax, $message); |
|
| 55 | } |
||
| 57 |