Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
48 | 39 | public static function assertTimestamp(int $value, string $message = '') |
|
49 | { |
||
50 | 39 | $format = $message ?: 'Timestamp (%s) must be in the range [%2$s..%3$s]'; |
|
51 | 39 | $message = sprintf( |
|
52 | 39 | $format, |
|
53 | 39 | self::valueToString($value), |
|
54 | 39 | self::valueToString(self::$timestampMin), |
|
55 | 39 | self::valueToString(self::$timestampMax) |
|
56 | ); |
||
57 | |||
58 | 39 | return self::range($value, self::$timestampMin, self::$timestampMax, $message); |
|
59 | } |
||
61 |