Passed
Push — dev ( d85471...98511f )
by Janko
18:01
created

StationCreator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 1
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Stu\Module\Station\Lib\Creation;
4
5
use Stu\Module\Spacecraft\Lib\Creation\SpacecraftConfiguratorInterface;
6
use Stu\Module\Spacecraft\Lib\Creation\SpacecraftCreatorInterface;
7
use Stu\Module\Station\Lib\StationWrapperInterface;
8
use Stu\Orm\Entity\ConstructionProgressInterface;
9
10
class StationCreator implements StationCreatorInterface
11
{
12
    /** @param SpacecraftCreatorInterface<StationWrapperInterface> $spacecraftCreator */
13 1
    public function __construct(private SpacecraftCreatorInterface $spacecraftCreator) {}
14
15
    public function createBy(
16
        int $userId,
17
        int $rumpId,
18
        int $buildplanId,
19
        ConstructionProgressInterface $progress
20
    ): SpacecraftConfiguratorInterface {
21
22
        return $this->spacecraftCreator->createBy(
23
            $userId,
24
            $rumpId,
25
            $buildplanId,
26
            new StationCreationConfig($progress)
27
        );
28
    }
29
}
30