Passed
Pull Request — master (#1821)
by Nico
52:02 queued 25:23
created

MixedBattleParty   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 12
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A initMembers() 0 3 1
1
<?php
2
3
namespace Stu\Module\Ship\Lib\Battle\Party;
4
5
use Doctrine\Common\Collections\Collection;
6
use Stu\Module\Ship\Lib\ShipWrapperInterface;
7
8
class MixedBattleParty extends AbstractBattleParty
9
{
10
    /** @param Collection<int, ShipWrapperInterface> $wrappers */
11
    public function __construct(
12
        private Collection $wrappers
13
    ) {
14
        parent::__construct($wrappers->first());
15
    }
16
17
    public function initMembers(): Collection
18
    {
19
        return $this->wrappers;
20
    }
21
}
22