Skip to content

Commit

Permalink
bot: fix cs [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Jan 16, 2024
1 parent 6d0414c commit fdb23a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Image/Transformer/FileTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static function normalizeFilter(callable|object $filter): callable
}

/**
* @return T
* @return Transformer\T
*/
abstract protected function object(\SplFileInfo $image): object;

Check failure on line 60 in src/Image/Transformer/FileTransformer.php

View workflow job for this annotation

GitHub Actions / sca / Static Code Analysis

Method Zenstruck\Image\Transformer\FileTransformer::object() has invalid return type Zenstruck\Image\Transformer\T.

Expand All @@ -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<string,mixed> $options
*/
abstract protected function save(object $object, array $options): void;

Check failure on line 71 in src/Image/Transformer/FileTransformer.php

View workflow job for this annotation

GitHub Actions / sca / Static Code Analysis

Parameter $object of method Zenstruck\Image\Transformer\FileTransformer::save() has invalid type Zenstruck\Image\Transformer\T.
Expand Down
10 changes: 5 additions & 5 deletions src/Image/Transformer/MultiTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
};
}
Expand Down

0 comments on commit fdb23a3

Please sign in to comment.