Dependency   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 51
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getType() 0 4 1
A getName() 0 4 1
A getValue() 0 4 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