| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function execute(string $localBasePath, StorageAdapterInterface $storageAdapter): bool |
||
| 32 | { |
||
| 33 | $localStream = fopen($localBasePath . $this->relativePath, 'wb'); |
||
| 34 | $remoteStream = $storageAdapter->getReadStream($this->blobId); |
||
| 35 | |||
| 36 | foreach ($this->streamFilterConfigMap as $filterName => $filterParams) |
||
| 37 | { |
||
| 38 | stream_filter_append($remoteStream, $filterName, STREAM_FILTER_READ, $filterParams); |
||
| 39 | } |
||
| 40 | |||
| 41 | $bytesCopied = stream_copy_to_stream($remoteStream, $localStream); |
||
| 42 | |||
| 43 | fclose($remoteStream); |
||
| 44 | fclose($localStream); |
||
| 45 | |||
| 46 | return $bytesCopied !== false; |
||
| 47 | } |
||
| 48 | |||
| 59 |