fix: bad type checking in media file dto
This commit is contained in:
@@ -11,9 +11,9 @@ readonly class MediaFileDto
|
||||
public string $size,
|
||||
) {}
|
||||
|
||||
public static function fromSplFileInfo(\SplFileInfo $fileInfo): self
|
||||
public static function fromSplFileInfo(\SplFileInfo|false $fileInfo): self|false
|
||||
{
|
||||
return new static(
|
||||
return false === $fileInfo ? false : new static(
|
||||
path: $fileInfo->getRealPath(),
|
||||
filename: $fileInfo->getFilename(),
|
||||
extension: $fileInfo->getExtension(),
|
||||
|
||||
@@ -10,7 +10,7 @@ class GetTvShowOptionsResult implements ResultInterface
|
||||
{
|
||||
public function __construct(
|
||||
public TmdbResult $media,
|
||||
public bool|MediaFileDto $file,
|
||||
public MediaFileDto|false $file,
|
||||
public string $season,
|
||||
public string $episode,
|
||||
public array $results
|
||||
|
||||
Reference in New Issue
Block a user