| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 7 | public function isEnemy(UserInterface $user, UserInterface $otherUser): bool |
|
| 36 | { |
||
| 37 | 7 | $enemyRelation = $this->enemyDeterminator->isEnemy($user, $otherUser); |
|
| 38 | 7 | if ($enemyRelation->isDominant()) { |
|
| 39 | 2 | return true; |
|
| 40 | } |
||
| 41 | |||
| 42 | 5 | $friendRelation = $this->friendDeterminator->isFriend($user, $otherUser); |
|
| 43 | 5 | if ($friendRelation->isDominant()) { |
|
| 44 | 2 | return false; |
|
| 45 | } |
||
| 46 | |||
| 47 | 3 | return $enemyRelation !== PlayerRelationTypeEnum::NONE; |
|
| 48 | } |
||
| 50 |