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

TrumfieldMember   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 63.64%

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 37
ccs 7
cts 11
cp 0.6364
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 1 1
A canBeAccessedFrom() 0 7 1
A getLocation() 0 4 1
A getUser() 0 4 1
A get() 0 4 1
A canAccess() 0 6 1
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