Reference::getIdentifier()   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 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