ItemAbstract::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Class ItemAbstract
4
 *
5
 * @filesource   ItemAbstract.php
6
 * @created      28.04.2019
7
 * @package      codemasher\WildstarDB\Archive
8
 * @author       smiley <[email protected]>
9
 * @copyright    2019 smiley
10
 * @license      MIT
11
 */
12
13
namespace codemasher\WildstarDB\Archive;
14
15
abstract class ItemAbstract{
16
17
	/** @var string */
18
	public $Parent;
19
	/** @var string */
20
	public $Name;
21
	/** @var int */
22
	public $NameOffset;
23
24
	/**
25
	 * ItemAbstract constructor.
26
	 *
27
	 * @param array  $data
28
	 * @param string $parent
29
	 */
30
	public function __construct(array $data, string $parent){
31
32
		foreach($data as $property => $value){
33
			$this->{$property} = $value;
34
		}
35
36
		$this->Parent = $parent;
37
	}
38
39
}
40