Element   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 32
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
declare(strict_types=1);
3
namespace JsonStreamParser\Decoder;
4
5
/**
6
 * @author  Stefan Pöhner <[email protected]>
7
 * @license MIT
8
 *
9
 * @package JsonStreamParser
10
 */
11
class Element
12
{
13
	const TYPE_VALUE  = 1;
14
	const TYPE_ARRAY  = 2;
15
	const TYPE_OBJECT = 3;
16
	const TYPE_KEY    = 4;
17
18
	/**
19
	 * @var int
20
	 */
21
	public $type;
22
23
	/**
24
	 * @var self|null
25
	 */
26
	public $parent;
27
28
	/**
29
	 * @var mixed
30
	 */
31
	public $value;
32
33
	/**
34
	 * Element constructor.
35
	 *
36
	 * @param int $type
37
	 */
38
	public function __construct(int $type)
39
	{
40
		$this->type = $type;
41
	}
42
}
43