Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
22 | 1 | public function handle($path, $remoteUrl, array $config = []) |
|
23 | { |
||
24 | 1 | $config = new Config($config); |
|
25 | 1 | if (method_exists($this->filesystem, 'getConfig')) { |
|
26 | 1 | $config->setFallback($this->filesystem->getConfig()); |
|
27 | } |
||
28 | |||
29 | 1 | $resource = fopen($remoteUrl, 'r'); |
|
30 | 1 | $status = (bool)$this->filesystem->getAdapter()->writeStream($path, $resource, $config); |
|
31 | 1 | fclose($resource); |
|
32 | 1 | return $status; |
|
33 | } |
||
34 | |||
35 | } |