ParameterReference::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php declare(strict_types = 1);
2
/**
3
 * Created by PhpStorm.
4
 * User: root
5
 * Date: 02.08.16
6
 * Time: 0:46.
7
 */
8
namespace samsonframework\container\definition\reference;
9
10
/**
11
 * Class ParameterReference
12
 *
13
 * @author Ruslan Molodyko <[email protected]>
14
 */
15
class ParameterReference implements ReferenceInterface
16
{
17
    /** @var string Parameter name */
18
    protected $parameterName;
19
20
    /**
21
     * ParameterReference constructor.
22
     *
23
     * @param string $parameterName
24
     */
25 2
    public function __construct(string $parameterName)
26
    {
27 2
        $this->parameterName = $parameterName;
28 2
    }
29
30
    /**
31
     * @param string $parameterName
32
     * @return ParameterReference
33
     */
34
    public function setParameterName(string $parameterName): ParameterReference
35
    {
36
        $this->parameterName = $parameterName;
37
38
        return $this;
39
    }
40
41
    /**
42
     * @return string
43
     */
44 1
    public function getParameterName(): string
45
    {
46 1
        return $this->parameterName;
47
    }
48
}
49