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

SelectedTechFactory::createSelectedTech()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 2
dl 0
loc 13
ccs 0
cts 9
cp 0
crap 2
rs 9.9666
c 0
b 0
f 0
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