Completed
Push — master ( 5d4923...821e5b )
by Vitaly
03:07
created

Service   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 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
 * Service collection configurator class.
14
 * @see    \samsonframework\container\configurator\ServiceConfigurator
15
 *
16
 * @author Vitaly Egorov <[email protected]>
17
 */
18
class Service extends ScopeConfigurator implements CollectionKeyConfiguratorInterface
19
{
20
    /**
21
     * Service collection configurator constructor.
22
     *
23
     * @param string|array $valueOrValues Service unique name
24
     *
25
     * @throws \InvalidArgumentException
26
     */
27
    public function __construct($valueOrValues)
28
    {
29
        // Pass to scope configurator
30
        parent::__construct($valueOrValues);
0 ignored issues
show
Bug introduced by
It seems like $valueOrValues defined by parameter $valueOrValues on line 27 can also be of type array; however, samsonframework\containe...igurator::__construct() does only seem to accept string, maybe add an additional type check?

This check looks at variables that have been passed in as parameters and are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
31
    }
32
}
33