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