| 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 |
||
| 20 | 7 | public function isFriend(UserInterface $user, UserInterface $otherUser): bool |
|
| 21 | { |
||
| 22 | 7 | $friendRelation = $this->friendDeterminator->isFriend($user, $otherUser); |
|
| 23 | 7 | if ($friendRelation->isDominant()) { |
|
| 24 | 2 | return true; |
|
| 25 | } |
||
| 26 | |||
| 27 | 5 | $enemyRelation = $this->enemyDeterminator->isEnemy($user, $otherUser); |
|
| 28 | 5 | if ($enemyRelation->isDominant()) { |
|
| 29 | 2 | return false; |
|
| 30 | } |
||
| 31 | |||
| 32 | 3 | return $friendRelation !== PlayerRelationTypeEnum::NONE; |
|
| 33 | } |
||
| 50 |