Passed
Pull Request — master (#1686)
by Nico
31:24
created

SingularityCoreSystemData::getLoadCost()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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 SingularityCoreSystemData 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_SINGULARITY_REACTOR;
15
    }
16
17
    public function getIcon(): string
18
    {
19
        return "singrkt.png";
20
    }
21
22
    public function getLoadUnits(): int
23
    {
24
        return ReactorWrapperInterface::SINGULARITY_CORE_LOAD;
25
    }
26
27
    public function getLoadCost(): array
28
    {
29
        return ReactorWrapperInterface::SINGULARITY_CORE_LOAD_COST;
30
    }
31
32
    public function getCapacity(): int
33
    {
34
        return $this->getTheoreticalReactorOutput() * ReactorWrapperInterface::SINGULARITY_CAPACITY_MULTIPLIER;
35
    }
36
}
37