@@ -341,7 +341,7 @@ public function read(string $path): string
341
341
$ path = $ this ->ensureFolderIsPrefixed (trim ($ path , '/ ' ));
342
342
343
343
try {
344
- $ contents = file_get_contents (Media::fromParams ($ path ));
344
+ $ contents = file_get_contents (Media::fromParams ($ path, [] ));
345
345
} catch (Exception ) {
346
346
$ contents = '' ;
347
347
}
@@ -488,6 +488,7 @@ private function getMetadata(string $path, string $type): FileAttributes
488
488
489
489
$ attributes = $ this ->mapToFileAttributes ($ result );
490
490
491
+ // @phpstan-ignore-next-line
491
492
if (! $ attributes instanceof FileAttributes) {
492
493
throw UnableToRetrieveMetadata::create ($ path , $ type );
493
494
}
@@ -688,11 +689,11 @@ public function directoryExists(string $path): bool
688
689
do {
689
690
$ response = (array ) $ this ->cloudinary ->adminApi ()->subFolders ($ needle , [
690
691
'max_results ' => 4 ,
691
- 'next_cursor ' => isset ( $ response ['next_cursor ' ]) ? $ response [ ' next_cursor ' ] : null , /** @phpstan-ignore-line */
692
+ 'next_cursor ' => $ response ['next_cursor ' ] ?? null ,
692
693
]);
693
694
694
- $ folders = array_merge ($ folders , $ response ['folders ' ]); /** @phpstan-ignore-line */
695
- } while (array_key_exists ('next_cursor ' , $ response ) && ! is_null ($ response ['next_cursor ' ])); /** @phpstan-ignore-line */
695
+ $ folders = array_merge ($ folders , $ response ['folders ' ]);
696
+ } while (array_key_exists ('next_cursor ' , $ response ) && ! is_null ($ response ['next_cursor ' ]));
696
697
$ folders_found = array_filter (
697
698
$ folders ,
698
699
function ($ e ) use ($ path ) {
0 commit comments