Passed
Push — feature/custom-services-cache ( 09c1c5...2e1100 )
by Jesús
04:16
created

FactoryE::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Benchmark\Framework\ClassResolver\FileCache\ModuleE;
6
7
use Gacela\Framework\AbstractFactory;
8
use Gacela\Framework\DocBlockResolverAwareTrait;
9
use GacelaTest\Fixtures\StringValueInterface;
10
11
/**
12
 * @method ConfigE getConfig()
13
 * @method Repository getRepository()
14
 */
15
final class FactoryE extends AbstractFactory
16
{
17
    use DocBlockResolverAwareTrait;
18
    private StringValueInterface $stringValue;
19
20
    public function __construct(StringValueInterface $stringValue)
21
    {
22
        $this->stringValue = $stringValue;
23
    }
24
25
    public function getArrayConfigAndProvidedDependency(): array
26
    {
27
        return [
28
            'config-key' => $this->getConfig()->getConfigValue(),
29
            'string-value' => $this->stringValue->value(),
30
            'provided-dependency' => $this->getProvidedDependency('provided-dependency'),
31
            'repository' => $this->getRepository()->getAll(),
32
        ];
33
    }
34
}
35