Passed
Push — dev ( 0aa780...31f66c )
by Janko
11:20
created

TrumfieldMember::canAccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 6
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Stu\Lib\Interaction\Member;
4
5
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Stu\Lib\Interaction\InteractionCheckType;
7
use Stu\Orm\Entity\MapInterface;
8
use Stu\Orm\Entity\StarSystemMapInterface;
9
use Stu\Orm\Entity\TrumfieldInterface;
10
use Stu\Orm\Entity\UserInterface;
11
12
class TrumfieldMember implements InteractionMemberInterface
13
{
14 1
    public function __construct(private TrumfieldInterface $trumfield) {}
15
16
    #[Override]
17
    public function get(): TrumfieldInterface
18
    {
19
        return $this->trumfield;
20
    }
21
22
    #[Override]
23
    public function canAccess(
24
        InteractionMemberInterface $other,
25
        callable $shouldCheck
26
    ): ?InteractionCheckType {
27
        return null;
28
    }
29
30 1
    #[Override]
31
    public function canBeAccessedFrom(
32
        InteractionMemberInterface $other,
33
        bool $isFriend,
34
        callable $shouldCheck
35
    ): ?InteractionCheckType {
36 1
        return null;
37
    }
38
39 1
    #[Override]
40
    public function getLocation(): MapInterface|StarSystemMapInterface
41
    {
42 1
        return $this->trumfield->getLocation();
43
    }
44
45 1
    #[Override]
46
    public function getUser(): ?UserInterface
47
    {
48 1
        return null;
49
    }
50
}
51