1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Stu\Lib\Map\VisualPanel\Layer\DataProvider\Subspace; |
6
|
|
|
|
7
|
|
|
use Override; |
|
|
|
|
8
|
|
|
use Stu\Lib\Map\VisualPanel\Layer\DataProvider\AbstractPanelLayerDataProvider; |
9
|
|
|
use Stu\Module\Control\StuTime; |
10
|
|
|
use Stu\Orm\Repository\LocationRepositoryInterface; |
11
|
|
|
use Stu\Orm\Repository\MapRepositoryInterface; |
12
|
|
|
use Stu\Orm\Repository\StarSystemMapRepositoryInterface; |
13
|
|
|
|
14
|
|
|
final class SubspaceDataProviderFactory implements SubspaceDataProviderFactoryInterface |
15
|
|
|
{ |
16
|
2 |
|
public function __construct( |
17
|
|
|
private readonly LocationRepositoryInterface $locationRepository, |
18
|
|
|
private readonly MapRepositoryInterface $mapRepository, |
19
|
|
|
private readonly StarSystemMapRepositoryInterface $starSystemMapRepository, |
20
|
|
|
private readonly StuTime $stuTime |
21
|
2 |
|
) {} |
22
|
1 |
|
#[Override] |
23
|
|
|
public function getDataProvider(int $id, SubspaceLayerTypeEnum $type, ?int $rumpId = null): AbstractPanelLayerDataProvider |
24
|
|
|
{ |
25
|
|
|
return match ($type) { |
26
|
1 |
|
SubspaceLayerTypeEnum::ALL => new GeneralSubspaceDataProvider($this->locationRepository, $this->mapRepository, $this->starSystemMapRepository), |
27
|
1 |
|
SubspaceLayerTypeEnum::IGNORE_USER => new IgnoringSubspaceDataProvider($id, $this->stuTime, $this->locationRepository, $this->mapRepository, $this->starSystemMapRepository), |
28
|
1 |
|
SubspaceLayerTypeEnum::ALLIANCE_ONLY => new AllianceSubspaceDataProvider($id, $this->locationRepository, $this->mapRepository, $this->starSystemMapRepository), |
29
|
1 |
|
SubspaceLayerTypeEnum::USER_ONLY => new UserSubspaceDataProvider($id, $this->locationRepository, $this->mapRepository, $this->starSystemMapRepository), |
30
|
1 |
|
SubspaceLayerTypeEnum::SPACECRAFT_ONLY => new ShipSubspaceDataProvider($id, $this->stuTime, $this->locationRepository, $this->mapRepository, $this->starSystemMapRepository, $rumpId) |
31
|
|
|
}; |
32
|
|
|
} |
33
|
|
|
} |
34
|
|
|
|
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