diff --git a/src/Image/Transformer/FileTransformer.php b/src/Image/Transformer/FileTransformer.php index 338c461..8e0c784 100644 --- a/src/Image/Transformer/FileTransformer.php +++ b/src/Image/Transformer/FileTransformer.php @@ -55,7 +55,7 @@ public static function normalizeFilter(callable|object $filter): callable } /** - * @return T + * @return Transformer\T */ abstract protected function object(\SplFileInfo $image): object; @@ -65,7 +65,7 @@ abstract protected function object(\SplFileInfo $image): object; abstract protected static function expectedClass(): string; /** - * @param T $object + * @param Transformer\T $object * @param array{format:string,output:string}|array $options */ abstract protected function save(object $object, array $options): void; diff --git a/src/Image/Transformer/MultiTransformer.php b/src/Image/Transformer/MultiTransformer.php index 21efc5d..59ea7b6 100644 --- a/src/Image/Transformer/MultiTransformer.php +++ b/src/Image/Transformer/MultiTransformer.php @@ -101,11 +101,11 @@ private function get(string $class): Transformer private static function defaultTransformer(string $class): Transformer { return self::$defaultTransformers[$class] ??= match ($class) { // @phpstan-ignore-line - \GdImage::class => new GdImageTransformer(), - \Imagick::class => new ImagickTransformer(), - ImagineImage::class, GdImagineImage::class, ImagickImagineImage::class, GmagickImagineImage::class => ImagineTransformer::createFor($class), - InterventionImage::class => new InterventionTransformer(), - SpatieImage::class => new SpatieImageTransformer(), + \GdImage::class => new Transformer\GdImageTransformer(), + \Imagick::class => new Transformer\ImagickTransformer(), + ImagineImage::class, GdImagineImage::class, ImagickImagineImage::class, GmagickImagineImage::class => Transformer\ImagineTransformer::createFor($class), + InterventionImage::class => new Transformer\InterventionTransformer(), + SpatieImage::class => new Transformer\SpatieImageTransformer(), default => throw new \InvalidArgumentException(\sprintf('No transformer available for "%s".', $class)), }; }