| Total Complexity | 4 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class ValuePath extends AbstractNode implements Path |
||
| 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( |
||
| 24 | AttributePath $attributePath, |
||
| 25 | Node $node, |
||
| 26 | ?Node $parent = null |
||
| 27 | ) { |
||
| 28 | parent::__construct($parent); |
||
| 29 | |||
| 30 | $this->attributePath = $attributePath; |
||
| 31 | |||
| 32 | $this->node = $node; |
||
| 33 | $this->node->setParent($this); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Get attribute path. |
||
| 38 | * |
||
| 39 | * @return AttributePath |
||
| 40 | */ |
||
| 41 | public function getAttributePath(): AttributePath |
||
| 42 | { |
||
| 43 | return $this->attributePath; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Set attribute path. |
||
| 48 | * |
||
| 49 | * @param AttributePath $attributePath |
||
| 50 | * |
||
| 51 | * @return ValuePath |
||
| 52 | * |
||
| 53 | * @internal |
||
| 54 | */ |
||
| 55 | public function setAttributePath(AttributePath $attributePath): ValuePath |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Get node. |
||
| 64 | * |
||
| 65 | * @return Node |
||
| 66 | */ |
||
| 67 | public function getNode(): Node |
||
| 70 | } |
||
| 71 | } |
||
| 72 |