| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function handle($path, $remoteUrl, $name, array $options = []) |
||
| 28 | { |
||
| 29 | //Get file from remote url |
||
| 30 | $contents = (new \GuzzleHttp\Client(['verify' => false])) |
||
| 31 | ->request('get', $remoteUrl) |
||
| 32 | ->getBody() |
||
| 33 | ->getContents(); |
||
| 34 | |||
| 35 | $path = trim($path.'/'.$name, '/'); |
||
| 36 | |||
| 37 | return $this->filesystem->put($path, $contents, $options) ? $path : false; |
||
|
|
|||
| 38 | } |
||
| 40 |