@@ -249,7 +249,7 @@ public static function fromBlank(int $width, int $height, ?array $color = null):
249
249
250
250
/**
251
251
* Returns the type of image from file.
252
- * @return self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP |null
252
+ * @return ImageType::* |null
253
253
*/
254
254
public static function detectTypeFromFile (string $ file , &$ width = null , &$ height = null ): ?int
255
255
{
@@ -260,7 +260,7 @@ public static function detectTypeFromFile(string $file, &$width = null, &$height
260
260
261
261
/**
262
262
* Returns the type of image from string.
263
- * @return self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP |null
263
+ * @return ImageType::* |null
264
264
*/
265
265
public static function detectTypeFromString (string $ s , &$ width = null , &$ height = null ): ?int
266
266
{
@@ -271,7 +271,7 @@ public static function detectTypeFromString(string $s, &$width = null, &$height
271
271
272
272
/**
273
273
* Returns the file extension for the given `ImageType::XXX` constant.
274
- * @param self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP $type
274
+ * @param ImageType::* $type
275
275
* @return value-of<self::Formats>
276
276
*/
277
277
public static function typeToExtension (int $ type ): string
@@ -286,7 +286,7 @@ public static function typeToExtension(int $type): string
286
286
287
287
/**
288
288
* Returns the `ImageType::XXX` constant for given file extension.
289
- * @return self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP
289
+ * @return ImageType::*
290
290
*/
291
291
public static function extensionToType (string $ extension ): int
292
292
{
@@ -302,7 +302,7 @@ public static function extensionToType(string $extension): int
302
302
303
303
/**
304
304
* Returns the mime type for the given `ImageType::XXX` constant.
305
- * @param self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP $type
305
+ * @param ImageType::* $type
306
306
*/
307
307
public static function typeToMimeType (int $ type ): string
308
308
{
@@ -606,7 +606,7 @@ public function place(self $image, int|string $left = 0, int|string $top = 0, in
606
606
607
607
/**
608
608
* Saves image to the file. Quality is in the range 0..100 for JPEG (default 85), WEBP (default 80) and AVIF (default 30) and 0..9 for PNG (default 9).
609
- * @param self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP |null $type
609
+ * @param ImageType::* |null $type
610
610
* @throws ImageException
611
611
*/
612
612
public function save (string $ file , ?int $ quality = null , ?int $ type = null ): void
@@ -618,7 +618,7 @@ public function save(string $file, ?int $quality = null, ?int $type = null): voi
618
618
619
619
/**
620
620
* Outputs image to string. Quality is in the range 0..100 for JPEG (default 85), WEBP (default 80) and AVIF (default 30) and 0..9 for PNG (default 9).
621
- * @param self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP $type
621
+ * @param ImageType::* $type
622
622
*/
623
623
public function toString (int $ type = ImageType::JPEG , ?int $ quality = null ): string
624
624
{
@@ -639,7 +639,7 @@ public function __toString(): string
639
639
640
640
/**
641
641
* Outputs image to browser. Quality is in the range 0..100 for JPEG (default 85), WEBP (default 80) and AVIF (default 30) and 0..9 for PNG (default 9).
642
- * @param self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP $type
642
+ * @param ImageType::* $type
643
643
* @throws ImageException
644
644
*/
645
645
public function send (int $ type = ImageType::JPEG , ?int $ quality = null ): void
@@ -652,7 +652,7 @@ public function send(int $type = ImageType::JPEG, ?int $quality = null): void
652
652
/**
653
653
* Outputs image to browser or file.
654
654
* @throws ImageException
655
- * @param self::JPEG|self::PNG|self::GIF|self::WEBP|self::AVIF|self::BMP $type
655
+ * @param ImageType::* $type
656
656
*/
657
657
private function output (int $ type , ?int $ quality , ?string $ file = null ): void
658
658
{
0 commit comments