ChildDict::parent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Knot\Dict;
2
3
use Knot\Dict;
4
5
class ChildDict extends Dict {
6
7
	/**
8
	 * @return self
9
	 */
10
	public function kill()
11
	{
12
		$this->parentArray->del($this->path());
13
		$this->data = [ ];
14
15
		return $this;
16
	}
17
18
19
	/**
20
	 * @return ParentDict
21
	 */
22
	public function parent()
23
	{
24
		return $this->parentArray;
25
	}
26
27
28
	/**
29
	 * In ChildArray's child's parent is parent array.
30
	 *
31
	 * @return ParentDict
32
	 */
33
	public function childParent()
34
	{
35
		return $this->parentArray;
36
	}
37
}
38