Completed
Push — master ( 70601c...836386 )
by Vitaly
04:46
created

Name   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toClassMetadata() 0 4 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\ClassConfiguratorInterface;
11
use samsonframework\container\metadata\ClassMetadata;
12
13
/**
14
 * Scope collection configurator class.
15
 *
16
 * @see    \samsonframework\container\configurator\ScopeConfigurator
17
 *
18
 * @author Vitaly Egorov <[email protected]>
19
 */
20
class Name implements ClassConfiguratorInterface, CollectionAttributeConfiguratorInterface
21
{
22
    /** @var string Dependency name */
23
    protected $name;
24
25
    /**
26
     * Dependency name collection configurator constructor.
27
     *
28
     * @param string $name Dependency name
29
     */
30 1
    public function __construct(string $name)
31
    {
32 1
        $this->name = $name;
33 1
    }
34
35
    /**
36
     * {@inheritDoc}
37
     */
38 1
    public function toClassMetadata(ClassMetadata $classMetadata)
39
    {
40 1
        $classMetadata->name = $this->name;
41 1
    }
42
}
43