Total Complexity | 9 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | abstract class BaseRange implements RangeInterface |
||
8 | { |
||
9 | public function isLowerInfinite(): bool |
||
10 | { |
||
11 | return null === $this->lower; |
||
12 | } |
||
13 | |||
14 | public function isUpperInfinite(): bool |
||
15 | { |
||
16 | return null === $this->upper; |
||
17 | } |
||
18 | |||
19 | public function isEmpty(): bool |
||
20 | { |
||
21 | return null !== $this->lower && $this->lower === $this->upper; |
||
22 | } |
||
23 | |||
24 | public function isInfinite(): bool |
||
27 | } |
||
28 | |||
29 | public function hasSingleBoundary(): bool |
||
30 | { |
||
31 | return !$this->isLowerInfinite() xor !$this->isUpperInfinite(); |
||
32 | } |
||
33 | |||
34 | public function hasBothBoundaries(): bool |
||
37 | } |
||
38 | } |
||
39 |