The expression return $this->registry->...())->read($file->key()) could return the type false which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
The expression return $this->registry->...eadStream($file->key()) also could return the type false which is incompatible with the return type mandated by Damax\Media\Domain\Stora...ctStorage::streamFile() of resource.
Loading history...
37
->get($file->storage())
38
->readStream($file->key())
39
;
40
}
41
42
protected function deleteFile(File $file): void
43
{
44
$this->registry
45
->get($file->storage())
46
->delete($file->key())
47
;
48
}
49
50
protected function writeFile(string $key, string $storage, $stream): void