Passed
Pull Request — master (#1969)
by Janko
22:34 queued 10:03
created

SingularityCoreSystemData   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 30
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getLoadUnits() 0 4 1
A getIcon() 0 4 1
A getCapacity() 0 4 1
A getSystemType() 0 4 1
A getLoadCost() 0 4 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\Spacecraft\Lib\ReactorWrapperInterface;
10
11
class SingularityCoreSystemData extends AbstractReactorSystemData
12
{
13
    #[Override]
14
    public function getSystemType(): SpacecraftSystemTypeEnum
15
    {
16
        return SpacecraftSystemTypeEnum::SYSTEM_SINGULARITY_REACTOR;
17
    }
18
19
    #[Override]
20
    public function getIcon(): string
21
    {
22
        return "singrkt.png";
23
    }
24
25
    #[Override]
26
    public function getLoadUnits(): int
27
    {
28
        return ReactorWrapperInterface::SINGULARITY_CORE_LOAD;
29
    }
30
31
    #[Override]
32
    public function getLoadCost(): array
33
    {
34
        return ReactorWrapperInterface::SINGULARITY_CORE_LOAD_COST;
35
    }
36
37
    #[Override]
38
    public function getCapacity(): int
39
    {
40
        return $this->getTheoreticalReactorOutput() * ReactorWrapperInterface::SINGULARITY_CAPACITY_MULTIPLIER;
41
    }
42
}
43