| 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 | 8 | public function __construct( |
|
| 12 | |||
| 13 | 9 | public function get(): int |
|
| 16 | } |
||
| 17 | |||
| 18 | 2 | public function isGreaterThan(self $value): bool |
|
| 19 | { |
||
| 20 | 2 | return $this->value > $value->get(); |
|
| 21 | } |
||
| 22 | 2 | ||
| 23 | public function diff(self $value): static |
||
| 24 | { |
||
| 25 | 1 | return new static($this->value - $value->get()); |
|
| 26 | } |
||
| 27 | 1 | ||
| 28 | public function increment(): static |
||
| 29 | { |
||
| 30 | $this->value += 1; |
||
| 31 | |||
| 32 | return $this; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function increaseBy(self $value): static |
||
| 40 | } |
||
| 41 | |||
| 42 | public function __toString(): string |
||
| 45 | } |
||
| 46 | } |
||
| 47 |