Passed
Push — master ( f50aa1...d726cb )
by Nico
57:47 queued 28:23
created

SelectedTechFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 19
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createSelectedTech() 0 13 1
A __construct() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Research;
6
7
use Noodlehaus\ConfigInterface;
8
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use Stu\Orm\Entity\ResearchInterface;
10
use Stu\Orm\Entity\UserInterface;
11
use Stu\Orm\Repository\BuildingRepositoryInterface;
12
use Stu\Orm\Repository\ResearchDependencyRepositoryInterface;
13
use Stu\Orm\Repository\ResearchedRepositoryInterface;
14
use Stu\Orm\Repository\ResearchRepositoryInterface;
15
16
final class SelectedTechFactory implements SelectedTechFactoryInterface
17
{
18
    public function __construct(private ResearchRepositoryInterface $researchRepository, private ResearchDependencyRepositoryInterface $researchDependencyRepository, private ResearchedRepositoryInterface $researchedRepository, private BuildingRepositoryInterface $buildingRepository, private ConfigInterface $config)
19
    {
20
    }
21
22
    #[Override]
23
    public function createSelectedTech(
24
        ResearchInterface $research,
25
        UserInterface $currentUser
26
    ): SelectedTechInterface {
27
        return new SelectedTech(
28
            $this->researchRepository,
29
            $this->researchedRepository,
30
            $this->researchDependencyRepository,
31
            $this->buildingRepository,
32
            $research,
33
            $currentUser,
34
            $this->config
35
        );
36
    }
37
}
38