Passed
Push — master ( 2b04c5...3174fa )
by Jesús
01:25 queued 12s
created

Factory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 4
c 3
b 0
f 0
dl 0
loc 13
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A createCompanyService() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Integration\Framework\UsingConfigDependencies\LocalConfig;
6
7
use Gacela\Framework\AbstractFactory;
8
use GacelaTest\Integration\Framework\UsingConfigDependencies\LocalConfig\Domain\GreeterGeneratorInterface;
9
use GacelaTest\Integration\Framework\UsingConfigDependencies\LocalConfig\Domain\NumberService;
10
11
final class Factory extends AbstractFactory
12
{
13
    private GreeterGeneratorInterface $companyGenerator;
14
15
    public function __construct(
16
        GreeterGeneratorInterface $companyGenerator
17
    ) {
18
        $this->companyGenerator = $companyGenerator;
19
    }
20
21
    public function createCompanyService(): NumberService
22
    {
23
        return new NumberService($this->companyGenerator);
24
    }
25
}
26