Dict   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 2
c 5
b 0
f 0
lcom 0
cbo 2
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createByReference() 0 4 1
A create() 0 4 1
1
<?php namespace Knot;
2
3
/**
4
 * Knot module.
5
 *
6
 * PHP version 5
7
 *
8
 * @category PHP
9
 * @package  Knot
10
 * @author   Ömer Kala <[email protected]>
11
 * @license  https://raw.githubusercontent.com/kalaomer/knot/master/LICENSE.txt MIT licence
12
 * @version  GIT: https://github.com/kalaomer/knot/
13
 * @link     https://kalaomer.github.com/knot/
14
 */
15
16
use Knot\Dict\AbstractDictBody;
17
use Knot\Dict\ParentDict;
18
19
abstract class Dict extends AbstractDictBody {
20
21
	/**
22
	 * Create Knot by reference.
23
	 *
24
	 * @param array &$data Knot data
25
	 *
26
	 * @return \Knot\Dict\ParentDict
27
	 */
28
	public static function createByReference(array &$data)
29
	{
30
		return new ParentDict($data);
31
	}
32
33
34
	/**
35
	 * Create Knot without reference.
36
	 *
37
	 * @param array $data Knot data
38
	 *
39
	 * @return \Knot\Dict\ParentDict
40
	 */
41
	public static function create($data)
42
	{
43
		return new ParentDict($data);
44
	}
45
}
46