Passed
Push — master ( 62af2e...d65fca )
by Théo
07:27 queued 04:04
created

ResolvedValue   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
dl 0
loc 28
ccs 6
cts 10
cp 0.6
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getName() 0 4 1
A getNamespace() 0 4 1
A getUse() 0 4 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\NodeVisitor\Resolver;
16
17
use PhpParser\Node\Name;
18
19
/**
20
 * @private
21
 */
22
final class ResolvedValue
23
{
24
    private $name;
25
    private $namespace;
26
    private $use;
27
28 275
    public function __construct(Name $name, ?Name $namespace, ?Name $use)
29
    {
30 275
        $this->name = $name;
31 275
        $this->namespace = $namespace;
32 275
        $this->use = $use;
33
    }
34
35 275
    public function getName(): Name
36
    {
37 275
        return $this->name;
38
    }
39
40
    public function getNamespace(): ?Name
41
    {
42
        return $this->namespace;
43
    }
44
45
    public function getUse(): ?Name
46
    {
47
        return $this->use;
48
    }
49
}
50