Element::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 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