ChildDict   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 3
c 4
b 0
f 0
lcom 1
cbo 2
dl 0
loc 33
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A kill() 0 7 1
A parent() 0 4 1
A childParent() 0 4 1
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