Passed
Pull Request — master (#1687)
by Nico
22:43
created

FusionCoreSystemData   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getSystemType() 0 3 1
A getLoadCost() 0 3 1
A getCapacity() 0 3 1
A getLoadUnits() 0 3 1
A getIcon() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Component\Ship\System\Data;
6
7
use Stu\Component\Ship\System\ShipSystemTypeEnum;
8
use Stu\Module\Ship\Lib\ReactorWrapperInterface;
9
10
class FusionCoreSystemData extends AbstractReactorSystemData
11
{
12
    function getSystemType(): ShipSystemTypeEnum
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
13
    {
14
        return ShipSystemTypeEnum::SYSTEM_FUSION_REACTOR;
15
    }
16
17
    public function getIcon(): string
18
    {
19
        return "fusrkt.png";
20
    }
21
22
    public function getLoadUnits(): int
23
    {
24
        return ReactorWrapperInterface::FUSION_REACTOR_LOAD;
25
    }
26
27
    public function getLoadCost(): array
28
    {
29
        return ReactorWrapperInterface::FUSION_REACTOR_LOAD_COST;
30
    }
31
32
    public function getCapacity(): int
33
    {
34
        return $this->getTheoreticalReactorOutput() * ReactorWrapperInterface::FUSIONCORE_CAPACITY_MULTIPLIER;
35
    }
36
}
37