Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
19 | public function __construct(array $data) |
||
20 | { |
||
21 | $this->name = $data['name']; |
||
22 | $this->md5 = $this->generateMd5Hash($data['tmp']); |
||
23 | $this->size = $data['size']; |
||
24 | $this->ext = 'bin'; |
||
25 | if (preg_match("#\.#", $data['name'])) { |
||
26 | $ext = explode('.', $data['name']); |
||
27 | $this->ext = end($ext); |
||
28 | } |
||
29 | $this->type = $data['type']; |
||
30 | } |
||
59 |