Total Complexity | 7 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class IntegerValue implements \Stringable |
||
8 | { |
||
9 | 12 | final public function __construct( |
|
12 | |||
13 | 11 | public function get(): int |
|
16 | } |
||
17 | |||
18 | 1 | public function isGreaterThan(self $value): bool |
|
21 | } |
||
22 | |||
23 | 1 | public function diff(self $value): static |
|
24 | { |
||
25 | 1 | return new static($this->value - $value->get()); |
|
26 | } |
||
27 | |||
28 | 1 | public function increment(): static |
|
29 | { |
||
30 | 1 | $this->value += 1; |
|
31 | |||
32 | 1 | return $this; |
|
33 | } |
||
34 | |||
35 | 1 | public function increaseBy(self $value): static |
|
40 | } |
||
41 | |||
42 | 1 | public function __toString(): string |
|
45 | } |
||
46 | } |
||
47 |