Passed
Push — feature/gacela-file-cache ( 052688...3add24 )
by Chema
07:28 queued 04:02
created

getArrayConfigAndProvidedDependency()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 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\Benchmark\Framework\ClassResolver\FileCache\ModuleG\Infra\EntityManager;
10
use GacelaTest\Benchmark\Framework\ClassResolver\FileCache\ModuleG\Infra\Repository;
11
use GacelaTest\Fixtures\StringValueInterface;
12
13
/**
14
 * @method ModuleGConfig getConfig()
15
 * @method Repository getRepository()
16
 * @method EntityManager getEntityManager()
17
 */
18
final class ModuleGFactory extends AbstractFactory
19
{
20
    use DocBlockResolverAwareTrait;
21
22
    private StringValueInterface $stringValue;
23
24
    public function __construct(StringValueInterface $stringValue)
25
    {
26
        $this->stringValue = $stringValue;
27
    }
28
29
    public function getArrayConfigAndProvidedDependency(): array
30
    {
31
        return [
32
            'config-key' => $this->getConfig()->getConfigValue(),
33
            'string-value' => $this->stringValue->value(),
34
            'provided-dependency' => $this->getProvidedDependency('provided-dependency'),
35
            'repository' => $this->getRepository()->getAll(),
36
            'entity-manager' => $this->getEntityManager()->updateEntity(),
37
        ];
38
    }
39
}
40