Passed
Pull Request — dev (#2038)
by Janko
10:55
created

CrewEnhancemenProxy::addExpertise()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 11
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Component\Crew\Skill;
6
7
use Stu\Config\Init;
8
use Stu\Module\Spacecraft\Lib\SpacecraftWrapperInterface;
9
use Stu\Orm\Entity\SpacecraftInterface;
10
11
abstract class CrewEnhancemenProxy
12
{
13 2
    public static function addExpertise(
14
        SpacecraftInterface|SpacecraftWrapperInterface $target,
15
        SkillEnhancementEnum $trigger,
16
        int $percentage = 100
17
    ): void {
18
19 2
        $crewEnhancement =
20 2
            Init::getContainer()->get(CrewEnhancementInterface::class);
21
22
23 2
        $crewEnhancement->addExpertise($target, $trigger, $percentage);
24
    }
25
}
26