Pair::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Annotations\Parser\Ast;
6
7
use Doctrine\Annotations\Parser\Visitor\Visitor;
8
9
final class Pair implements Value
10
{
11
    /** @var Scalar */
12
    private $key;
13
14
    /** @var ValuableNode */
15
    private $value;
16
17 3
    public function __construct(Scalar $key, ValuableNode $value)
18
    {
19 3
        $this->key   = $key;
20 3
        $this->value = $value;
21 3
    }
22
23 1
    public function getKey() : Scalar
24
    {
25 1
        return $this->key;
26
    }
27
28 1
    public function getValue() : ValuableNode
29
    {
30 1
        return $this->value;
31
    }
32
33 1
    public function dispatch(Visitor $visitor) : void
34
    {
35 1
        $visitor->visitPair($this);
36 1
    }
37
}
38