Reference   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 getIdentifier() 0 3 1
A isFullyQualified() 0 3 1
A dispatch() 0 3 1
A __construct() 0 4 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 Reference implements Node
10
{
11
    /** @var string */
12
    private $identifier;
13
14
    /** @var bool */
15
    private $fullyQualified;
16
17 42
    public function __construct(string $identifier, bool $fullyQualified)
18
    {
19 42
        $this->identifier     = $identifier;
20 42
        $this->fullyQualified = $fullyQualified;
21 42
    }
22
23 35
    public function getIdentifier() : string
24
    {
25 35
        return $this->identifier;
26
    }
27
28 27
    public function isFullyQualified() : bool
29
    {
30 27
        return $this->fullyQualified;
31
    }
32
33 11
    public function dispatch(Visitor $visitor) : void
34
    {
35 11
        $visitor->visitReference($this);
36 11
    }
37
}
38