PrefixedName   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 21
rs 10
c 1
b 0
f 0
wmc 3
ccs 0
cts 11
cp 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getOriginalName() 0 3 1
A getPrefixedName() 0 3 1
A __construct() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the humbug/php-scoper package.
7
 *
8
 * Copyright (c) 2017 Théo FIDRY <[email protected]>,
9
 *                    Pádraic Brady <[email protected]>
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Humbug\PhpScoper\PhpParser\Node;
16
17
use PhpParser\Node\Name\FullyQualified;
18
19
// TODO:review
20
final class PrefixedName extends FullyQualified
21
{
22
    private FullyQualified $prefixedName;
23
    private FullyQualified $originalName;
24
25
    public function __construct(FullyQualified $prefixedName, FullyQualified $originalName, array $attributes = [])
26
    {
27
        parent::__construct($prefixedName, $attributes);
28
29
        $this->prefixedName = new FullyQualified($prefixedName, $attributes);
30
        $this->originalName = new FullyQualified($originalName, $attributes);
31
    }
32
33
    public function getPrefixedName(): FullyQualified
34
    {
35
        return $this->prefixedName;
36
    }
37
38
    public function getOriginalName(): FullyQualified
39
    {
40
        return $this->originalName;
41
    }
42
}
43