Passed
Push — feature/change-cache-to-profil... ( 160b60 )
by Chema
04:07
created

FactoryB   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getArrayConfigAndProvidedDependency() 0 7 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Benchmark\Framework\ClassResolver\FileProfiler\ModuleB;
6
7
use Gacela\Framework\AbstractFactory;
8
use Gacela\Framework\DocBlockResolverAwareTrait;
9
use GacelaTest\Fixtures\StringValueInterface;
10
11
/**
12
 * @method ConfigB getConfig()
13
 * @method Repository getRepository()
14
 */
15
final class FactoryB 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