Completed
Push — master ( daa27a...019907 )
by Vitaly
03:25
created

InjectArgument   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
ccs 3
cts 3
cp 1
rs 10
c 3
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php declare(strict_types = 1);
2
/**
3
 * Created by Vitaly Iegorov <[email protected]>.
4
 * on 07.08.16 at 15:46
5
 */
6
namespace samsonframework\container\annotation;
7
8
use samsonframework\container\configurator\InjectableArgumentConfigurator;
9
10
/**
11
 * Method argument injection annotation.
12
 *
13
 * @author Vitaly Egorov <[email protected]>
14
 *
15
 * @Annotation
16
 */
17
class InjectArgument extends InjectableArgumentConfigurator
18
{
19
    /**
20
     * InjectArgument constructor.
21
     *
22
     * @param array $valueOrValues
23
     *
24
     * @throws \InvalidArgumentException
25
     */
26 14
    public function __construct(array $valueOrValues)
27
    {
28
        // Pass to injectable argument configurator
29 14
        parent::__construct(key($valueOrValues), $valueOrValues[key($valueOrValues)]);
30 14
    }
31
}
32