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

Factory::__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\ModuleG;
6
7
use Gacela\Framework\AbstractFactory;
8
use Gacela\Framework\DocBlockResolverAwareTrait;
9
use GacelaTest\Fixtures\StringValueInterface;
10
11
/**
12
 * @method Config getConfig()
13
 * @method Repository getRepository()
14
 */
15
final class Factory extends AbstractFactory
16
{
17
    use DocBlockResolverAwareTrait;
18
19
    private StringValueInterface $stringValue;
20
21
    public function __construct(StringValueInterface $stringValue)
22
    {
23
        $this->stringValue = $stringValue;
24
    }
25
26
    public function getArrayConfigAndProvidedDependency(): array
27
    {
28
        return [
29
            'config-key' => $this->getConfig()->getConfigValue(),
30
            'string-value' => $this->stringValue->value(),
31
            'provided-dependency' => $this->getProvidedDependency('provided-dependency'),
32
            'repository' => $this->getRepository()->getAll(),
33
        ];
34
    }
35
}
36