Файл: vendor/intervention/image/src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php
Строк: 46
<?php
declare(strict_types=1);
namespace InterventionImageDriversGdDecoders;
use SplFileInfo;
use InterventionImageExceptionsDecoderException;
use InterventionImageInterfacesColorInterface;
use InterventionImageInterfacesDecoderInterface;
use InterventionImageInterfacesImageInterface;
class SplFileInfoImageDecoder extends FilePathImageDecoder implements DecoderInterface
{
/**
* {@inheritdoc}
*
* @see DecoderInterface::decode()
*/
public function decode(mixed $input): ImageInterface|ColorInterface
{
if (!is_a($input, SplFileInfo::class)) {
throw new DecoderException('Unable to decode input');
}
return parent::decode($input->getRealPath());
}
}