Passed
Push — master ( bdfaf8...931c46 )
by smiley
01:33
created

ArchiveFile   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
/**
3
 * Class ArchiveFile
4
 *
5
 * @filesource   ArchiveFile.php
6
 * @created      28.04.2019
7
 * @package      codemasher\WildstarDB
8
 * @author       smiley <[email protected]>
9
 * @copyright    2019 smiley
10
 * @license      MIT
11
 */
12
13
namespace codemasher\WildstarDB;
14
15
class ArchiveFile extends ArchiveItemAbstract{
16
17
	public $Flags;
18
	public $Filetime;
19
	public $FileUtime;
20
	public $SizeUncompressed;
21
	public $SizeCompressed;
22
	public $Hash;
23
24
	public function __construct(array $data, string $parent){
25
		parent::__construct($data, $parent);
26
27
		$this->Hash      = \bin2hex($this->Hash);
28
		$this->FileUtime = (int)($this->Filetime/100000000);
29
#		$dt = (new \DateTime)->createFromFormat('U.u', $this->FileUtime) ?: (new \DateTime)->createFromFormat('U', $this->FileUtime);
30
#		$this->FileTimeStr = $dt->format(\DateTimeInterface::RFC3339_EXTENDED);
31
	}
32
33
}
34