Passed
Push — feature/gacela-cached-class-na... ( 44c645 )
by Chema
26:13
created

FactoryA::getArrayConfigAndProvidedDependency()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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