Encode using media type instead of extension #246
test.yaml
on: pull_request
coding-style
18s
static-analysis
29s
Matrix: tests
Annotations
6 errors
tests (8.1, lowest)
Process completed with exit code 2.
|
InvalidNullableReturnType:
src/Api/Encoder.php#L77
src/Api/Encoder.php:77:58: InvalidNullableReturnType: The declared return type 'Intervention\Image\MediaType' for League\Glide\Api\Encoder::getMediaType is not nullable, but 'Intervention\Image\MediaType|null' contains null (see https://psalm.dev/144)
|
NullableReturnStatement:
src/Api/Encoder.php#L86
src/Api/Encoder.php:86:20: NullableReturnStatement: The declared return type 'Intervention\Image\MediaType' for League\Glide\Api\Encoder::getMediaType is not nullable, but the function returns 'enum(Intervention\Image\MediaType::IMAGE_AVIF)|enum(Intervention\Image\MediaType::IMAGE_BMP)|enum(Intervention\Image\MediaType::IMAGE_GIF)|enum(Intervention\Image\MediaType::IMAGE_HEIC)|enum(Intervention\Image\MediaType::IMAGE_HEIF)|enum(Intervention\Image\MediaType::IMAGE_JP2)|enum(Intervention\Image\MediaType::IMAGE_JPEG)|enum(Intervention\Image\MediaType::IMAGE_JPG)|enum(Intervention\Image\MediaType::IMAGE_JPM)|enum(Intervention\Image\MediaType::IMAGE_JPX)|enum(Intervention\Image\MediaType::IMAGE_MS_BMP)|enum(Intervention\Image\MediaType::IMAGE_PJPEG)|enum(Intervention\Image\MediaType::IMAGE_PNG)|enum(Intervention\Image\MediaType::IMAGE_TIFF)|enum(Intervention\Image\MediaType::IMAGE_WEBP)|enum(Intervention\Image\MediaType::IMAGE_X_AVIF)|enum(Intervention\Image\MediaType::IMAGE_X_BITMAP)|enum(Intervention\Image\MediaType::IMAGE_X_BMP)|enum(Intervention\Image\MediaType::IMAGE_X_HEIC)|enum(Intervention\Image\MediaType::IMAGE_X_JPEG)|enum(Intervention\Image\MediaType::IMAGE_X_MS_BMP)|enum(Intervention\Image\MediaType::IMAGE_X_PNG)|enum(Intervention\Image\MediaType::IMAGE_X_WEBP)|enum(Intervention\Image\MediaType::IMAGE_X_WINDOWS_BMP)|enum(Intervention\Image\MediaType::IMAGE_X_WIN_BITMAP)|enum(Intervention\Image\MediaType::IMAGE_X_XBITMAP)|null' (see https://psalm.dev/139)
|
static-analysis
Process completed with exit code 2.
|
static-analysis:
src/Api/Encoder.php#L86
Method League\Glide\Api\Encoder::getMediaType() should return Intervention\Image\MediaType but returns Intervention\Image\MediaType|null.
|
static-analysis
Process completed with exit code 1.
|