Passed
Push — dev ( 42b6d7...a9da1d )
by Nico
20:25 queued 09:26
created

SubSpaceSystemData   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 38
ccs 0
cts 14
cp 0
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setSpacecraftId() 0 4 1
A getAnalyzeTime() 0 3 1
A getSystemType() 0 4 1
A setAnalyzeTime() 0 4 1
A getSpacecraftId() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Component\Spacecraft\System\Data;
6
7
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...
8
use Stu\Component\Spacecraft\System\SpacecraftSystemTypeEnum;
9
use Stu\Module\Template\StatusBarFactoryInterface;
10
use Stu\Orm\Repository\SpacecraftSystemRepositoryInterface;
11
12
class SubSpaceSystemData extends AbstractSystemData
13
{
14
    public ?int $spacecraftId = null;
15
    public ?int $analyzeTime = null;
16
17
    public function __construct(
18
        SpacecraftSystemRepositoryInterface $shipSystemRepository,
19
        StatusBarFactoryInterface $statusBarFactory
20
    ) {
21
        parent::__construct($shipSystemRepository, $statusBarFactory);
22
    }
23
24
    #[Override]
25
    public function getSystemType(): SpacecraftSystemTypeEnum
26
    {
27
        return SpacecraftSystemTypeEnum::SUBSPACE_SCANNER;
28
    }
29
30
    public function getSpacecraftId(): ?int
31
    {
32
        return $this->spacecraftId ?? null;
33
    }
34
35
    public function setSpacecraftId(?int $spacecraftId): SubSpaceSystemData
36
    {
37
        $this->spacecraftId = $spacecraftId;
38
        return $this;
39
    }
40
41
    public function getAnalyzeTime(): ?int
42
    {
43
        return $this->analyzeTime ?? null;
44
    }
45
46
    public function setAnalyzeTime(?int $analyzeTime): SubSpaceSystemData
47
    {
48
        $this->analyzeTime = $analyzeTime;
49
        return $this;
50
    }
51
}
52