Pair   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 8
dl 0
loc 27
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getKey() 0 3 1
A __construct() 0 4 1
A dispatch() 0 3 1
A getValue() 0 3 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