Файл: vendor/intervention/image/src/Decoders/ColorObjectDecoder.php
Строк: 39
<?php
declare(strict_types=1);
namespace InterventionImageDecoders;
use InterventionImageDriversAbstractDecoder;
use InterventionImageExceptionsDecoderException;
use InterventionImageInterfacesColorInterface;
use InterventionImageInterfacesImageInterface;
class ColorObjectDecoder extends AbstractDecoder
{
/**
* {@inheritdoc}
*
* @see DecoderInterface::decode()
*/
public function decode(mixed $input): ImageInterface|ColorInterface
{
if (!is_a($input, ColorInterface::class)) {
throw new DecoderException('Unable to decode input');
}
return $input;
}
}