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

ParentDefinition::getPointer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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