|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Stu\Lib\Map\VisualPanel\Layer\DataProvider\Spacecraftcount; |
|
6
|
|
|
|
|
7
|
|
|
use Override; |
|
|
|
|
|
|
8
|
|
|
use Stu\Lib\Map\VisualPanel\Layer\DataProvider\AbstractPanelLayerDataProvider; |
|
9
|
|
|
use Stu\Orm\Repository\LocationRepositoryInterface; |
|
10
|
|
|
use Stu\Orm\Repository\MapRepositoryInterface; |
|
11
|
|
|
use Stu\Orm\Repository\StarSystemMapRepositoryInterface; |
|
12
|
|
|
|
|
13
|
|
|
final class SpacecraftCountDataProviderFactory implements SpacecraftCountDataProviderFactoryInterface |
|
14
|
|
|
{ |
|
15
|
2 |
|
public function __construct( |
|
16
|
|
|
private LocationRepositoryInterface $locationRepository, |
|
17
|
|
|
private MapRepositoryInterface $mapRepository, |
|
18
|
|
|
private StarSystemMapRepositoryInterface $starSystemMapRepository |
|
19
|
2 |
|
) {} |
|
20
|
|
|
|
|
21
|
4 |
|
#[Override] |
|
22
|
|
|
public function getDataProvider(int $id, SpacecraftCountLayerTypeEnum $type): AbstractPanelLayerDataProvider |
|
23
|
|
|
{ |
|
24
|
|
|
|
|
25
|
4 |
|
return match ($type) { |
|
26
|
4 |
|
SpacecraftCountLayerTypeEnum::ALL => |
|
27
|
4 |
|
new GeneralSpacecraftCountDataProvider($this->locationRepository, $this->mapRepository, $this->starSystemMapRepository), |
|
28
|
4 |
|
SpacecraftCountLayerTypeEnum::ALLIANCE_ONLY => |
|
29
|
|
|
new AllianceSpacecraftCountDataProvider($id, $this->locationRepository, $this->mapRepository, $this->starSystemMapRepository), |
|
30
|
4 |
|
SpacecraftCountLayerTypeEnum::USER_ONLY => |
|
31
|
|
|
new UserSpacecraftCountDataProvider($id, $this->locationRepository, $this->mapRepository, $this->starSystemMapRepository), |
|
32
|
4 |
|
SpacecraftCountLayerTypeEnum::SPACECRAFT_ONLY => |
|
33
|
4 |
|
new SpacecraftSpacecraftCountDataProvider($id, $this->locationRepository, $this->mapRepository, $this->starSystemMapRepository), |
|
34
|
4 |
|
}; |
|
35
|
|
|
} |
|
36
|
|
|
} |
|
37
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths