Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.7085 |
Changes | 0 |
1 | <?php |
||
56 | 1 | public function uncompress($source, $target) |
|
57 | { |
||
58 | 1 | if ($this->zip->open($source) === false) { |
|
59 | return false; |
||
60 | } |
||
61 | |||
62 | 1 | if ($this->zip->extractTo(dirname($target), basename($target)) === false) { |
|
63 | $this->zip->close(); |
||
64 | |||
65 | return false; |
||
66 | } |
||
67 | |||
68 | 1 | return $this->zip->close(); |
|
69 | } |
||
70 | } |
||
71 |