NamedParameter   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 __construct() 0 4 1
A dispatch() 0 3 1
A getName() 0 3 1
A getValue() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Annotations\Parser\Ast\Parameter;
6
7
use Doctrine\Annotations\Parser\Ast\Parameter;
8
use Doctrine\Annotations\Parser\Ast\Scalar\Identifier;
9
use Doctrine\Annotations\Parser\Ast\ValuableNode;
10
use Doctrine\Annotations\Parser\Visitor\Visitor;
11
12
final class NamedParameter implements Parameter
13
{
14
    /** @var Identifier */
15
    private $name;
16
17
    /** @var ValuableNode */
18
    private $value;
19
20 13
    public function __construct(Identifier $name, ValuableNode $value)
21
    {
22 13
        $this->name  = $name;
23 13
        $this->value = $value;
24 13
    }
25
26 4
    public function getName() : Identifier
27
    {
28 4
        return $this->name;
29
    }
30
31 4
    public function getValue() : ValuableNode
32
    {
33 4
        return $this->value;
34
    }
35
36 4
    public function dispatch(Visitor $visitor) : void
37
    {
38 4
        $visitor->visitNamedParameter($this);
39 4
    }
40
}
41