CollectionParameterResolver   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\ParameterConfiguratorInterface;
11
use samsonframework\container\metadata\ParameterMetadata;
12
13
/**
14
 * Collection parameter resolver class.
15
 *
16
 * @author Vitaly Iegorov <[email protected]>
17
 */
18
class CollectionParameterResolver extends AbstractCollectionResolver implements CollectionParameterResolverInterface
19
{
20
    /** Collection parameter key */
21
    const KEY = 'arguments';
22
23
    /**
24
     * {@inheritDoc}
25
     */
26 1
    public function resolve(array $parameterDataArray, ParameterMetadata $parameterMetadata)
27
    {
28
        // Iterate collection
29 1
        foreach ($this->getAttributeConfigurator($parameterDataArray) as $configurator) {
30
            /** @var ParameterConfiguratorInterface $configurator Parse parameter metadata */
31 1
            $configurator->toParameterMetadata($parameterMetadata);
32
        }
33
34 1
        return $parameterMetadata;
35
    }
36
}
37