Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4.0466 |
Changes | 0 |
1 | <?php |
||
9 | 2 | public function equals(ValueObjectInterface $otherValue): bool |
|
10 | { |
||
11 | 2 | if (!$otherValue instanceof self) { |
|
12 | return false; |
||
13 | } |
||
14 | 2 | foreach ($this->getValueObjectMap() as $attrName => $value) { |
|
15 | 2 | if (!$value->equals($otherValue->get($attrName))) { |
|
16 | 2 | return false; |
|
17 | } |
||
18 | } |
||
19 | 2 | return true; |
|
20 | } |
||
21 | |||
27 |