Completed
Push — master ( 013ee6...5d4923 )
by Vitaly
03:15
created

Scope   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 18
wmc 1
lcom 0
cbo 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php declare(strict_types = 1);
2
/**
3
 * Created by PhpStorm.
4
 * User: root
5
 * Date: 27.07.2016
6
 * Time: 1:55.
7
 */
8
namespace samsonframework\container\collection;
9
10
use samsonframework\container\configurator\ScopeConfigurator;
11
12
/**
13
 * Scope collection configurator class.
14
 * @see    \samsonframework\container\configurator\ScopeConfigurator
15
 *
16
 * @author Vitaly Egorov <[email protected]>
17
 */
18
class Scope extends ScopeConfigurator implements CollectionConfiguratorInterface
19
{
20
    /**
21
     * Scope annotation configurator constructor.
22
     *
23
     * @param string|array $valueOrValues Service unique name
24
     *
25
     * @throws \InvalidArgumentException
26
     */
27
    public function __construct($valueOrValues)
28
    {
29
        // Parse annotation value
30
        $scopeNameData = $this->parseAnnotationValue($valueOrValues);
0 ignored issues
show
Bug introduced by
The method parseAnnotationValue() does not seem to exist on object<samsonframework\c...ainer\collection\Scope>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
31
32
        // Pass to scope configurator
33
        parent::__construct(array_shift($scopeNameData));
34
    }
35
}
36