Passed
Push — dev ( 04bdae...5ade2a )
by Janko
28:32
created

provideDataForSystemMap()   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 1
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\Lib\Map\VisualPanel\Layer\DataProvider\Shipcount;
6
7
use Crunz\Exception\NotImplementedException;
8
use Stu\Lib\Map\VisualPanel\Layer\DataProvider\Shipcount\AbstractShipcountDataProvider;
9
use Stu\Lib\Map\VisualPanel\PanelBoundaries;
10
use Stu\Orm\Repository\MapRepositoryInterface;
11
use Stu\Orm\Repository\StarSystemMapRepositoryInterface;
12
13
final class UserShipcountDataProvider extends AbstractShipcountDataProvider
14
{
15
    private int $userId;
16
17
    public function __construct( #
18
        int $userId,
19
        MapRepositoryInterface $mapRepository,
20
        StarSystemMapRepositoryInterface $starSystemMapRepository
21
    ) {
22
        parent::__construct($mapRepository, $starSystemMapRepository);
23
        $this->userId = $userId;
24
    }
25
26
    protected function provideDataForMap(PanelBoundaries $boundaries): array
27
    {
28
        return $this->mapRepository->getUserShipcountLayerData($boundaries, $this->userId, $this->createResultSetMapping());
29
    }
30
31
    protected function provideDataForSystemMap(PanelBoundaries $boundaries): array
32
    {
33
        throw new NotImplementedException('this is not possible');
34
    }
35
}
36