Completed
Push — master ( 7a0e45...47c14e )
by Vitaly
03:32
created

Service::toParameterMetadata()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
c 1
b 0
f 1
cc 1
eloc 2
nc 1
nop 1
crap 2
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\attribute;
9
10
use samsonframework\container\configurator\ParameterConfiguratorInterface;
11
use samsonframework\container\configurator\ServiceConfigurator;
12
use samsonframework\container\metadata\ParameterMetadata;
13
14
/**
15
 * Service attribute configurator class.
16
 *
17
 * @see    \samsonframework\container\configurator\ScopeConfigurator
18
 *
19
 * @author Vitaly Egorov <[email protected]>
20
 */
21
class Service extends ServiceConfigurator implements AttributeConfiguratorInterface, ParameterConfiguratorInterface
22
{
23
    /** @var string Configurator key */
24
    const KEY = 'service';
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function toParameterMetadata(ParameterMetadata $parameterMetadata)
30
    {
31
        $parameterMetadata->dependency = $this->serviceName;
32
    }
33
}
34