CollectionClassResolver   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolve() 0 10 2
1
<?php declare(strict_types = 1);
2
/**
3
 * Created by PhpStorm.
4
 * User: root
5
 * Date: 29.07.2016
6
 * Time: 21:38.
7
 */
8
namespace samsonframework\containercollection;
9
10
use samsonframework\container\configurator\ClassConfiguratorInterface;
11
use samsonframework\container\metadata\ClassMetadata;
12
13
/**
14
 * Collection class resolver class.
15
 *
16
 * @author Vitaly Egorov <[email protected]>
17
 * @author Ruslan Molodyko <[email protected]>
18
 */
19
class CollectionClassResolver extends AbstractCollectionResolver implements CollectionResolverInterface
20
{
21
    /** Collection class key */
22
    const KEY = 'instance';
23
24
    /**
25
     * {@inheritDoc}
26
     */
27 1
    public function resolve(array $configurationArray, ClassMetadata $classMetadata)
28
    {
29
        // Iterate collection
30 1
        foreach ($this->getAttributeConfigurator($configurationArray) as $configurator) {
31
            /** @var ClassConfiguratorInterface $configurator Parse class metadata */
32 1
            $configurator->toClassMetadata($classMetadata);
33
        }
34
35 1
        return $classMetadata;
36
    }
37
}
38