Conditions | 8 |
Paths | 6 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 16 |
Changes | 0 |
1 | <?php |
||
51 | 19 | public function equals(StatementObject $actor): bool |
|
52 | { |
||
53 | if (!parent::equals($actor)) { |
||
54 | return false; |
||
55 | } |
||
56 | |||
57 | if (!$actor instanceof Actor) { |
||
58 | return false; |
||
59 | } |
||
60 | |||
61 | if ($this->name !== $actor->name) { |
||
62 | return false; |
||
63 | } |
||
64 | |||
65 | if (null !== $this->iri xor null !== $actor->iri) { |
||
66 | return false; |
||
67 | } |
||
68 | |||
69 | if (null !== $this->iri && null !== $actor->iri && !$this->iri->equals($actor->iri)) { |
||
70 | return false; |
||
71 | } |
||
72 | |||
73 | 26 | return true; |
|
74 | } |
||
75 | } |
||
76 |