Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 4 | public function storeFileFromUrl(string $url, ?string $name, ?\Closure $progressCallback = null, bool $force = false): bool |
|
18 | { |
||
19 | 4 | if (!($exists = $this->storage->exists($name)) || $force) { |
|
|
|||
20 | 3 | if ($exists) { |
|
21 | 1 | $this->storage->delete($name); |
|
22 | } |
||
23 | |||
24 | 3 | return $this->storage->storeFromUrl($url, $name, $progressCallback); |
|
25 | } |
||
26 | |||
27 | 2 | return false; |
|
28 | } |
||
50 |