| Total Complexity | 10 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 95.45% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class PlayerRelationDeterminator implements PlayerRelationDeterminatorInterface |
||
| 14 | { |
||
| 15 | 16 | public function __construct( |
|
| 19 | |||
| 20 | 21 | #[Override] |
|
| 21 | public function isFriend(?UserInterface $user, ?UserInterface $otherUser): bool |
||
| 22 | { |
||
| 23 | 21 | if ($user === null || $otherUser === null) { |
|
| 24 | return false; |
||
| 25 | } |
||
| 26 | |||
| 27 | 21 | if ($user === $otherUser) { |
|
| 28 | 13 | return true; |
|
| 29 | } |
||
| 30 | |||
| 31 | 8 | $friendRelation = $this->friendDeterminator->isFriend($user, $otherUser); |
|
| 32 | 8 | if ($friendRelation->isDominant()) { |
|
| 33 | 2 | return true; |
|
| 34 | } |
||
| 35 | |||
| 36 | 6 | $enemyRelation = $this->enemyDeterminator->isEnemy($user, $otherUser); |
|
| 37 | 6 | if ($enemyRelation->isDominant()) { |
|
| 38 | 2 | return false; |
|
| 39 | } |
||
| 40 | |||
| 41 | 4 | return $friendRelation !== PlayerRelationTypeEnum::NONE; |
|
| 42 | } |
||
| 43 | |||
| 44 | 7 | #[Override] |
|
| 58 | } |
||
| 59 | } |
||
| 60 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths