@@ 30-36 (lines=7) @@ | ||
27 | /** |
|
28 | * @param int $value |
|
29 | */ |
|
30 | public function __construct(int $value) |
|
31 | { |
|
32 | if ($value < self::ANY) { |
|
33 | throw new \InvalidArgumentException(sprintf('Wrong expected version value, got: %d', $value)); |
|
34 | } |
|
35 | $this->value = $value; |
|
36 | } |
|
37 | ||
38 | /** |
|
39 | * @return int |
@@ 18-25 (lines=8) @@ | ||
15 | /** |
|
16 | * @param int $value |
|
17 | */ |
|
18 | public function __construct(int $value) |
|
19 | { |
|
20 | if ($value !== self::FORWARD && $value !== self::BACKWARD) { |
|
21 | throw new \InvalidArgumentException('Invalid direction.'); |
|
22 | } |
|
23 | ||
24 | $this->value = $value; |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * @return bool |