| 1 | <?php |
||
| 16 | class BoundaryCondition |
||
| 17 | { |
||
| 18 | private $bounds; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param int $bounds |
||
| 22 | */ |
||
| 23 | 33 | private function __construct(int $bounds) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param int $bounds |
||
| 30 | * |
||
| 31 | * @throws \Assert\AssertionFailedException |
||
| 32 | */ |
||
| 33 | 33 | public static function create(int $bounds): BoundaryCondition |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @param int $value |
||
| 43 | * |
||
| 44 | * @return bool |
||
| 45 | * |
||
| 46 | * @throws BoundaryTestException |
||
| 47 | */ |
||
| 48 | 25 | public function test(int $value): bool |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @param int $value |
||
| 70 | * |
||
| 71 | * @throws BoundaryTestException |
||
| 72 | */ |
||
| 73 | 8 | private function throwBoundaryTestException(int $value): void |
|
| 79 | } |
||
| 80 |