Passed
Push — master ( fda4e5...db1fd3 )
by Maarten de
03:08 queued 01:40
created

ValuePath::getAttributePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cloudstek\SCIM\FilterParser\AST;
6
7
/**
8
 * Value path.
9
 */
10
class ValuePath extends AbstractNode
11
{
12
    private AttributePath $attributePath;
13
14
    private Node $node;
15
16
    /**
17
     * Value path..
18
     *
19
     * @param AttributePath $attributePath
20
     * @param Node          $node
21
     * @param Node|null     $parent
22
     */
23
    public function __construct(AttributePath $attributePath, Node $node, ?Node $parent = null)
24
    {
25
        parent::__construct($parent);
26
27
        $this->attributePath = $attributePath;
28
        $this->node = $node;
29
30
        $this->node->setParent($this);
31
    }
32
33
    /**
34
     * Get attribute path.
35
     *
36
     * @return AttributePath
37
     */
38
    public function getAttributePath(): AttributePath
39
    {
40
        return $this->attributePath;
41
    }
42
43
    /**
44
     * Get node.
45
     *
46
     * @return Node
47
     */
48
    public function getNode(): Node
49
    {
50
        return $this->node;
51
    }
52
}
53