Dependency::getType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace Phact\Container\Builder;
4
5
class Dependency implements DependencyInterface
6
{
7
    /**
8
     * @var int
9
     */
10
    private $type;
11
12
    /**
13
     * @var string
14
     */
15
    private $name;
16
17
    /**
18
     * @var mixed
19
     */
20
    private $value;
21
22 33
    public function __construct(
23
        int $type,
24
        string $name,
25
        $value = null
26
    ) {
27 33
        $this->type = $type;
28 33
        $this->name = $name;
29 33
        $this->value = $value;
30 33
    }
31
32
    /**
33
     * {@inheritDoc}
34
     */
35 25
    public function getType(): int
36
    {
37 25
        return $this->type;
38
    }
39
40
    /**
41
     * {@inheritDoc}
42
     */
43 26
    public function getName(): string
44
    {
45 26
        return $this->name;
46
    }
47
48
    /**
49
     * {@inheritDoc}
50
     */
51 25
    public function getValue()
52
    {
53 25
        return $this->value;
54
    }
55
}
56