Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function unarchive(string $source, string $target): bool |
||
31 | { |
||
32 | if (false === $this->zip->open($source)) { |
||
33 | return false; |
||
34 | } |
||
35 | |||
36 | if (false === $this->zip->extractTo(dirname($target))) { |
||
37 | $this->zip->close(); |
||
38 | |||
39 | return false; |
||
40 | } |
||
41 | |||
42 | return $this->zip->close(); |
||
43 | } |
||
44 | } |
||
45 |