Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
13 | public function save(): bool |
||
14 | { |
||
15 | if($this->response()->type === 'error') |
||
16 | { |
||
17 | return false; |
||
18 | } |
||
19 | if(!$this->getFiles()) |
||
20 | { |
||
21 | return false; |
||
22 | } |
||
23 | if($this->upload()) { |
||
24 | $this->setResponse(200, "success", "upload performed successfully", "upload", $this->getData()); |
||
25 | return true; |
||
26 | } |
||
27 | return false; |
||
28 | } |
||
58 | } |