| Total Complexity | 3 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class IntegerVo extends AbstractVo |
||
| 13 | { |
||
| 14 | use IntegerVoFactoryTrait; |
||
| 15 | |||
| 16 | public function equal($vo): bool |
||
| 17 | { |
||
| 18 | return $this->value === $vo->toValue(); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function duplicate() |
||
| 22 | { |
||
| 23 | return new self($this->value); |
||
|
|
|||
| 24 | } |
||
| 25 | |||
| 26 | protected function valid(): bool |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: