intelephense

1.14.41.16.1
lib/stub/gd/gd.php
lib/stub/gd/gd.php
+68−34
Index: package/lib/stub/gd/gd.php
===================================================================
--- package/lib/stub/gd/gd.php
+++ package/lib/stub/gd/gd.php
@@ -148,9 +148,10 @@
  * <b>imagecolorallocate</b>.
  * </p>
  * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  */
-function imagearc(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagearc(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color) {}
 
 /**
  * Draw an ellipse
  * @link https://php.net/manual/en/function.imageellipse.php
@@ -172,9 +173,10 @@
  * <b>imagecolorallocate</b>.
  * </p>
  * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  */
-function imageellipse(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imageellipse(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $center_x, int $center_y, int $width, int $height, int $color) {}
 
 /**
  * Draw a character horizontally
  * @link https://php.net/manual/en/function.imagechar.php
@@ -194,16 +196,17 @@
  * <b>imagecolorallocate</b>.
  * </p>
  * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  */
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
 function imagechar(
     GdImage $image,
     #[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
     int $x,
     int $y,
     string $char,
     int $color
-): bool {}
+) {}
 
 /**
  * Draw a character vertically
  * @link https://php.net/manual/en/function.imagecharup.php
@@ -223,16 +226,17 @@
  * <b>imagecolorallocate</b>.
  * </p>
  * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  */
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
 function imagecharup(
     GdImage $image,
     #[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
     int $x,
     int $y,
     string $char,
     int $color
-): bool {}
+) {}
 
 /**
  * Get the index of the color of a pixel
  * @link https://php.net/manual/en/function.imagecolorat.php
@@ -319,9 +323,10 @@
  * The color identifier.
  * </p>
  * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  */
-function imagecolordeallocate(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagecolordeallocate(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $color) {}
 
 /**
  * Get the index of the specified color or its closest possible alternative
  * @link https://php.net/manual/en/function.imagecolorresolve.php
@@ -436,9 +441,10 @@
  * Source height.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagecopy(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagecopy(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height) {}
 
 /**
  * Copy and merge part of an image
  * @link https://php.net/manual/en/function.imagecopymerge.php
@@ -474,9 +480,10 @@
  * implements alpha transparency for true colour images.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagecopymerge(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagecopymerge(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct) {}
 
 /**
  * Copy and merge part of an image with gray scale
  * @link https://php.net/manual/en/function.imagecopymergegray.php
@@ -512,9 +519,10 @@
  * it implements alpha transparency for true colour images.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagecopymergegray(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagecopymergegray(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct) {}
 
 /**
  * Copy and resize part of an image
  * @link https://php.net/manual/en/function.imagecopyresized.php
@@ -545,9 +553,10 @@
  * Source height.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagecopyresized(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagecopyresized(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height) {}
 
 /**
  * Create a new palette based image
  * @link https://php.net/manual/en/function.imagecreate.php
@@ -610,9 +619,10 @@
  * Thickness, in pixels.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagesetthickness(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $thickness): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagesetthickness(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $thickness) {}
 
 /**
  * Draw a partial arc and fill it
  * @link https://php.net/manual/en/function.imagefilledarc.php
@@ -645,9 +655,10 @@
  * A bitwise OR of the following possibilities:
  * IMG_ARC_PIE</p>
  * @return bool true on success or false on failure.
  */
-function imagefilledarc(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagefilledarc(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style) {}
 
 /**
  * Draw a filled ellipse
  * @link https://php.net/manual/en/function.imagefilledellipse.php
@@ -669,9 +680,10 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagefilledellipse(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagefilledellipse(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $center_x, int $center_y, int $width, int $height, int $color) {}
 
 /**
  * Set the blending mode for an image
  * @link https://php.net/manual/en/function.imagealphablending.php
@@ -681,9 +693,10 @@
  * the default value is true otherwise the default value is false
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagealphablending(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, bool $enable): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagealphablending(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, bool $enable) {}
 
 /**
  * Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images
  * @link https://php.net/manual/en/function.imagesavealpha.php
@@ -692,9 +705,10 @@
  * Whether to save the alpha channel or not. Default to false.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagesavealpha(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, bool $enable): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagesavealpha(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, bool $enable) {}
 
 /**
  * Allocate a color for an image
  * @link https://php.net/manual/en/function.imagecolorallocatealpha.php
@@ -820,9 +834,10 @@
  * Source height.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagecopyresampled(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagecopyresampled(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $dst_image, #[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height) {}
 
 /**
  * Rotate an image with a given angle
  * @link https://php.net/manual/en/function.imagerotate.php
@@ -846,17 +861,18 @@
 ): GdImage|false {}
 
 /**
  * Should antialias functions be used or not. <br/>
- * Before 7.2.0 it's only available if PHP iscompiled with the bundled version of the GD library.
+ * Before 7.2.0 it's only available if PHP is compiled with the bundled version of the GD library.
  * @link https://php.net/manual/en/function.imageantialias.php
  * @param resource|GdImage $image
  * @param bool $enable <p>
  * Whether to enable antialiasing or not.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imageantialias(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, bool $enable): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imageantialias(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, bool $enable) {}
 
 /**
  * Set the tile image for filling
  * @link https://php.net/manual/en/function.imagesettile.php
@@ -865,9 +881,10 @@
  * The image resource to be used as a tile.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagesettile(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, GdImage $tile): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagesettile(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, GdImage $tile) {}
 
 /**
  * Set the brush image for line drawing
  * @link https://php.net/manual/en/function.imagesetbrush.php
@@ -876,9 +893,10 @@
  * An image resource.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagesetbrush(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, GdImage $brush): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagesetbrush(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, GdImage $brush) {}
 
 /**
  * Set the style for line drawing
  * @link https://php.net/manual/en/function.imagesetstyle.php
@@ -1144,9 +1162,11 @@
  * @link https://php.net/manual/en/function.imagedestroy.php
  * @param resource|GdImage $image
  * @return bool true on success or false on failure.
  */
-function imagedestroy(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image): bool {}
+#[Deprecated(since: '8.5')]
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagedestroy(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image) {}
 
 /**
  * Apply a gamma correction to a GD image
  * @link https://php.net/manual/en/function.imagegammacorrect.php
@@ -1158,9 +1178,10 @@
  * The output gamma.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagegammacorrect(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, float $input_gamma, float $output_gamma): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagegammacorrect(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, float $input_gamma, float $output_gamma) {}
 
 /**
  * Flood fill
  * @link https://php.net/manual/en/function.imagefill.php
@@ -1176,9 +1197,10 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagefill(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x, int $y, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagefill(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x, int $y, int $color) {}
 
 /**
  * Draw a filled polygon
  * @link https://php.net/manual/en/function.imagefilledpolygon.php
@@ -1245,9 +1267,10 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagefilledrectangle(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagefilledrectangle(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2, int $color) {}
 
 /**
  * Flood fill to specific color
  * @link https://php.net/manual/en/function.imagefilltoborder.php
@@ -1267,9 +1290,10 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagefilltoborder(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x, int $y, int $border_color, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagefilltoborder(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x, int $y, int $border_color, int $color) {}
 
 /**
  * Get font width
  * @link https://php.net/manual/en/function.imagefontwidth.php
@@ -1322,9 +1346,10 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imageline(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imageline(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2, int $color) {}
 
 /**
  * Load a new font
  * @link https://php.net/manual/en/function.imageloadfont.php
@@ -1440,9 +1465,10 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagerectangle(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagerectangle(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2, int $color) {}
 
 /**
  * Set a single pixel
  * @link https://php.net/manual/en/function.imagesetpixel.php
@@ -1458,9 +1484,10 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagesetpixel(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x, int $y, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagesetpixel(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x, int $y, int $color) {}
 
 /**
  * Draw a string horizontally
  * @link https://php.net/manual/en/function.imagestring.php
@@ -1482,16 +1509,17 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
 function imagestring(
     GdImage $image,
     #[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
     int $x,
     int $y,
     string $string,
     int $color
-): bool {}
+) {}
 
 /**
  * Draw a string vertically
  * @link https://php.net/manual/en/function.imagestringup.php
@@ -1511,16 +1539,17 @@
  * imagecolorallocate.
  * </p>
  * @return bool true on success or false on failure.
  */
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
 function imagestringup(
     GdImage $image,
     #[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
     int $x,
     int $y,
     string $string,
     int $color
-): bool {}
+) {}
 
 /**
  * Get image width
  * @link https://php.net/manual/en/function.imagesx.php
@@ -1562,9 +1591,10 @@
  * imagecolorallocate.
  * </p>
  * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  */
-function imagedashedline(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagedashedline(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2, int $color) {}
 
 /**
  * Give the bounding box of a text using TrueType fonts
  * @link https://php.net/manual/en/function.imagettfbbox.php
@@ -2186,9 +2216,10 @@
  * Use pixel replacement (equivalent of passing true to
  * imagealphablending)</p>
  * @return bool true on success or false on failure.
  */
-function imagelayereffect(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $effect): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagelayereffect(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $effect) {}
 
 /**
  * Makes the colors of the palette version of an image more closely match the true color version
  * @link https://php.net/manual/en/function.imagecolormatch.php
@@ -2200,9 +2231,10 @@
  * size as image1.
  * </p>
  * @return bool true on success or false on failure.
  */
-function imagecolormatch(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image1, GdImage $image2): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagecolormatch(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image1, GdImage $image2) {}
 
 /**
  * Output XBM image to browser or file
  * @link https://php.net/manual/en/function.imagexbm.php
@@ -2280,9 +2312,10 @@
  * @link https://php.net/manual/en/function.imagesetclip.php
  * @see imagegetclip()
  * @since 7.2
  */
-function imagesetclip(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imagesetclip(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $x1, int $y1, int $x2, int $y2) {}
 
 /**
  * <b>imagegetclip()</b> retrieves the current clipping rectangle, i.e. the area beyond which no pixels will be drawn.
  * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}
@@ -3094,9 +3127,10 @@
  * </table>
  * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
  * @since 5.5
  */
-function imageflip(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $mode): bool {}
+#[LanguageLevelTypeAware(['8.5' => 'true'], default: 'bool')]
+function imageflip(#[LanguageLevelTypeAware(['8.0' => 'GdImage'], default: '')] $image, int $mode) {}
 
 /**
  * Converts a palette based image to true color
  * @link https://secure.php.net/manual/en/function.imagepalettetotruecolor.php