Completed
Push — master ( b7cb0e...ffcfdb )
by Дмитрий
02:53
created

ParentDefinition   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%
Metric Value
dl 0
loc 39
ccs 9
cts 9
cp 1
rs 10
wmc 4
lcom 0
cbo 2

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getPointer() 0 4 1
A getNamespace() 0 4 1
A setNamespace() 0 4 1
1
<?php
2
/**
3
 * @author Patsura Dmitry https://github.com/ovr <[email protected]>
4
 */
5
6
namespace PHPSA\Definition;
7
8
use PhpParser\Node;
9
use PHPSA\CompiledExpression;
10
use PHPSA\Context;
11
use PHPSA\ScopePointer;
12
use PHPSA\Variable;
13
14
abstract class ParentDefinition extends AbstractDefinition
15
{
16
    /**
17
     * @var string
18
     */
19
    protected $namespace;
20
    
21
    /**
22
     * @return string
23
     */
24 7
    public function getName()
25
    {
26 7
        return $this->name;
27
    }
28
29
    /**
30
     * @return ScopePointer
31
     */
32 1
    public function getPointer()
33
    {
34 1
        return new ScopePointer($this);
35
    }
36
37
    /**
38
     * @return string
39
     */
40 6
    public function getNamespace()
41
    {
42 6
        return $this->namespace;
43
    }
44
45
    /**
46
     * @param string $namespace
47
     */
48 6
    public function setNamespace($namespace)
49
    {
50 6
        $this->namespace = $namespace;
51 6
    }
52
}
53