|
17 | 17 | namespace PhpCollective\Infrastructure\Storage\Processor\Image; |
18 | 18 |
|
19 | 19 | use GuzzleHttp\Psr7\StreamWrapper; |
20 | | -use http\Exception\InvalidArgumentException; |
| 20 | +use InvalidArgumentException; |
21 | 21 | use Intervention\Image\Image; |
22 | 22 | use Intervention\Image\ImageManager; |
23 | 23 | use League\Flysystem\Config; |
|
29 | 29 | use PhpCollective\Infrastructure\Storage\UrlBuilder\UrlBuilderInterface; |
30 | 30 | use PhpCollective\Infrastructure\Storage\Utility\TemporaryFile; |
31 | 31 |
|
32 | | -use function PhpCollective\Infrastructure\Storage\fopen; |
| 32 | +use function PhpCollective\Infrastructure\Storage\openFile; |
33 | 33 |
|
34 | 34 | /** |
35 | 35 | * Image Operator |
@@ -222,7 +222,7 @@ public function process(FileInterface $file): FileInterface |
222 | 222 |
|
223 | 223 | // Create a local tmp file on the processing system / machine |
224 | 224 | $tempFile = TemporaryFile::create(); |
225 | | - $tempFileStream = fopen($tempFile, 'wb+'); |
| 225 | + $tempFileStream = openFile($tempFile, 'wb+'); |
226 | 226 |
|
227 | 227 | // Read the data from the files resource if (still) present, |
228 | 228 | // if not fetch it from the storage backend and write the data |
@@ -294,7 +294,7 @@ protected function optimizeAndStore(FileInterface $file, string $path): void |
294 | 294 | // Optimize it and write it to another file |
295 | 295 | $this->optimizer()->optimize($optimizerTempFile, $optimizerOutput); |
296 | 296 | // Open a new stream for the storage system |
297 | | - $optimizerOutputHandler = fopen($optimizerOutput, 'rb+'); |
| 297 | + $optimizerOutputHandler = openFile($optimizerOutput, 'rb+'); |
298 | 298 |
|
299 | 299 | // And store it... |
300 | 300 | $storage->writeStream( |
|
0 commit comments