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

FactoryA   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getArrayConfigAndProvidedDependency() 0 6 1
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