Skip to content

Commit 2d8e028

Browse files
committed
Update ext/gd parameter names
1 parent 5039999 commit 2d8e028

File tree

2 files changed

+160
-159
lines changed

2 files changed

+160
-159
lines changed

ext/gd/gd.stub.php

Lines changed: 85 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,39 @@ function gd_info(): array {}
1010

1111
function imageloadfont(string $filename): int|false {}
1212

13-
function imagesetstyle(GdImage $im, array $styles): bool {}
13+
function imagesetstyle(GdImage $image, array $style): bool {}
1414

15-
function imagecreatetruecolor(int $x_size, int $y_size): GdImage|false {}
15+
function imagecreatetruecolor(int $width, int $height): GdImage|false {}
1616

17-
function imageistruecolor(GdImage $im): bool {}
17+
function imageistruecolor(GdImage $image): bool {}
1818

19-
function imagetruecolortopalette(GdImage $im, bool $ditherFlag, int $colorWanted): bool {}
19+
function imagetruecolortopalette(GdImage $image, bool $dither, int $num_colors): bool {}
2020

21-
function imagepalettetotruecolor(GdImage $im): bool {}
21+
function imagepalettetotruecolor(GdImage $image): bool {}
2222

23-
function imagecolormatch(GdImage $im1, GdImage $im2): bool {}
23+
function imagecolormatch(GdImage $image1, GdImage $image2): bool {}
2424

25-
function imagesetthickness(GdImage $im, int $thickness): bool {}
25+
function imagesetthickness(GdImage $image, int $thickness): bool {}
2626

27-
function imagefilledellipse(GdImage $im, int $cx, int $cy, int $w, int $h, int $color): bool {}
27+
function imagefilledellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}
2828

29-
function imagefilledarc(GdImage $im, int $cx, int $cy, int $w, int $h, int $s, int $e, int $col, int $style): bool {}
29+
function imagefilledarc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): bool {}
3030

31-
function imagealphablending(GdImage $im, bool $blend): bool {}
31+
function imagealphablending(GdImage $image, bool $enable): bool {}
3232

33-
function imagesavealpha(GdImage $im, bool $save): bool {}
33+
function imagesavealpha(GdImage $image, bool $enable): bool {}
3434

35-
function imagelayereffect(GdImage $im, int $effect): bool {}
35+
function imagelayereffect(GdImage $image, int $effect): bool {}
3636

37-
function imagecolorallocatealpha(GdImage $im, int $red, int $green, int $blue, int $alpha): int|false {}
37+
function imagecolorallocatealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}
3838

39-
function imagecolorresolvealpha(GdImage $im, int $red, int $green, int $blue, int $alpha): int|false {}
39+
function imagecolorresolvealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}
4040

41-
function imagecolorclosestalpha(GdImage $im, int $red, int $green, int $blue, int $alpha): int|false {}
41+
function imagecolorclosestalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}
4242

43-
function imagecolorexactalpha(GdImage $im, int $red, int $green, int $blue, int $alpha): int|false {}
43+
function imagecolorexactalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}
4444

45-
function imagecopyresampled(GdImage $dst_im, GdImage $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): bool {}
45+
function imagecopyresampled(GdImage $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 {}
4646

4747
#ifdef PHP_WIN32
4848

@@ -52,13 +52,13 @@ function imagegrabscreen(): GdImage|false {}
5252

5353
#endif
5454

55-
function imagerotate(GdImage $im, float $angle, int $bgdcolor, int $ignoretransparent = 0): GdImage|false {}
55+
function imagerotate(GdImage $image, float $angle, int $bgdcolor, int $ignoretransparent = 0): GdImage|false {}
5656

57-
function imagesettile(GdImage $im, GdImage $tile): bool {}
57+
function imagesettile(GdImage $image, GdImage $tile): bool {}
5858

59-
function imagesetbrush(GdImage $im, GdImage $brush): bool {}
59+
function imagesetbrush(GdImage $image, GdImage $brush): bool {}
6060

61-
function imagecreate(int $x_size, int $y_size): GdImage|false {}
61+
function imagecreate(int $width, int $height): GdImage|false {}
6262

6363
function imagetypes(): int {}
6464

@@ -100,156 +100,157 @@ function imagecreatefrombmp(string $filename): GdImage|false {}
100100
function imagecreatefromtga(string $filename): GdImage|false {}
101101
#endif
102102

103-
function imagexbm(GdImage $im, ?string $filename, ?int $foreground = null): bool {}
103+
function imagexbm(GdImage $image, ?string $filename, ?int $foreground = null): bool {}
104104

105105
/** @param resource|string|null $to */
106-
function imagegif(GdImage $im, $to = null): bool {}
106+
function imagegif(GdImage $image, $to = null): bool {}
107107

108108
#ifdef HAVE_GD_PNG
109109
/** @param resource|string|null $to */
110-
function imagepng(GdImage $im, $to = null, int $quality = -1, int $filters = -1): bool {}
110+
function imagepng(GdImage $image, $to = null, int $quality = -1, int $filters = -1): bool {}
111111
#endif
112112

113113
#ifdef HAVE_GD_WEBP
114114
/** @param resource|string|null $to */
115-
function imagewebp(GdImage $im, $to = null, int $quality = -1): bool {}
115+
function imagewebp(GdImage $image, $to = null, int $quality = -1): bool {}
116116
#endif
117117

118118
#ifdef HAVE_GD_JPG
119119
/** @param resource|string|null $to */
120-
function imagejpeg(GdImage $im, $to = null, int $quality = -1): bool {}
120+
function imagejpeg(GdImage $image, $to = null, int $quality = -1): bool {}
121121
#endif
122122

123123
/** @param resource|string|null $to */
124-
function imagewbmp(GdImage $im, $to = null, ?int $foreground = null): bool {}
124+
function imagewbmp(GdImage $image, $to = null, ?int $foreground = null): bool {}
125125

126-
function imagegd(GdImage $im, string $to = UNKNOWN): bool {}
126+
function imagegd(GdImage $image, string $to = UNKNOWN): bool {}
127127

128-
function imagegd2(GdImage $im, string $to = UNKNOWN, int $chunk_size = UNKNOWN, int $type = UNKNOWN): bool {}
128+
function imagegd2(GdImage $image, string $to = UNKNOWN, int $chunk_size = UNKNOWN, int $type = UNKNOWN): bool {}
129129

130130
#ifdef HAVE_GD_BMP
131131
/** @param resource|string|null $to */
132-
function imagebmp(GdImage $im, $to = null, bool $compressed = true): bool {}
132+
function imagebmp(GdImage $image, $to = null, bool $compressed = true): bool {}
133133
#endif
134134

135-
function imagedestroy(GdImage $im): bool {}
135+
function imagedestroy(GdImage $image): bool {}
136136

137-
function imagecolorallocate(GdImage $im, int $red, int $green, int $blue): int|false {}
137+
function imagecolorallocate(GdImage $image, int $red, int $green, int $blue): int|false {}
138138

139139
function imagepalettecopy(GdImage $dst, GdImage $src): void {}
140140

141-
function imagecolorat(GdImage $im, int $x, int $y): int|false {}
141+
function imagecolorat(GdImage $image, int $x, int $y): int|false {}
142142

143-
function imagecolorclosest(GdImage $im, int $red, int $green, int $blue): int|false {}
143+
function imagecolorclosest(GdImage $image, int $red, int $green, int $blue): int|false {}
144144

145-
function imagecolorclosesthwb(GdImage $im, int $red, int $green, int $blue): int|false {}
145+
function imagecolorclosesthwb(GdImage $image, int $red, int $green, int $blue): int|false {}
146146

147-
function imagecolordeallocate(GdImage $im, int $index): bool {}
147+
function imagecolordeallocate(GdImage $image, int $index): bool {}
148148

149-
function imagecolorresolve(GdImage $im, int $red, int $green, int $blue): int|false {}
149+
function imagecolorresolve(GdImage $image, int $red, int $green, int $blue): int|false {}
150150

151-
function imagecolorexact(GdImage $im, int $red, int $green, int $blue): int|false {}
151+
function imagecolorexact(GdImage $image, int $red, int $green, int $blue): int|false {}
152152

153-
function imagecolorset(GdImage $im, int $color, int $red, int $green, int $blue, int $alpha = 0): ?bool {}
153+
function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): ?bool {}
154154

155-
function imagecolorsforindex(GdImage $im, int $index): array|false {}
155+
function imagecolorsforindex(GdImage $image, int $index): array|false {}
156156

157-
function imagegammacorrect(GdImage $im, float $inputgamma, float $outputgamma): bool {}
157+
function imagegammacorrect(GdImage $image, float $inputgamma, float $outputgamma): bool {}
158158

159-
function imagesetpixel(GdImage $im, int $x, int $y, int $col): bool {}
159+
function imagesetpixel(GdImage $image, int $x, int $y, int $color): bool {}
160160

161-
function imageline(GdImage $im, int $x1, int $y1, int $x2, int $y2, int $col): bool {}
161+
function imageline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
162162

163-
function imagedashedline(GdImage $im, int $x1, int $y1, int $x2, int $y2, int $col): bool {}
163+
function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
164164

165-
function imagerectangle(GdImage $im, int $x1, int $y1, int $x2, int $y2, int $col): bool {}
165+
function imagerectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
166166

167-
function imagefilledrectangle(GdImage $im, int $x1, int $y1, int $x2, int $y2, int $col): bool {}
167+
function imagefilledrectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
168168

169-
function imagearc(GdImage $im, int $cx, int $cy, int $w, int $h, int $s, int $e, int $col): bool {}
169+
function imagearc(GdImage $image, int $cx, int $cy, int $width, int $height, int $s, int $e, int $color): bool {}
170170

171-
function imageellipse(GdImage $im, int $cx, int $cy, int $w, int $h, int $color): bool {}
171+
function imageellipse(GdImage $image, int $cx, int $cy, int $width, int $height, int $color): bool {}
172172

173-
function imagefilltoborder(GdImage $im, int $x, int $y, int $border, int $col): bool {}
173+
function imagefilltoborder(GdImage $image, int $x, int $y, int $border, int $color): bool {}
174174

175-
function imagefill(GdImage $im, int $x, int $y, int $col): bool {}
175+
function imagefill(GdImage $image, int $x, int $y, int $color): bool {}
176176

177-
function imagecolorstotal(GdImage $im): int {}
177+
function imagecolorstotal(GdImage $image): int {}
178178

179-
function imagecolortransparent(GdImage $im, ?int $col = null): ?int {}
179+
function imagecolortransparent(GdImage $image, ?int $color = null): ?int {}
180180

181-
function imageinterlace(GdImage $im, ?int $interlace = null): ?int {}
181+
function imageinterlace(GdImage $image, ?int $interlace = null): ?int {}
182182

183-
function imagepolygon(GdImage $im, array $points, int $num_points_or_col, ?int $col = null): bool {}
183+
function imagepolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}
184184

185-
function imageopenpolygon(GdImage $im, array $points, int $num_points_or_col, ?int $col = null): bool {}
185+
function imageopenpolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}
186186

187-
function imagefilledpolygon(GdImage $im, array $points, int $num_points_or_col, ?int $col = null): bool {}
187+
function imagefilledpolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}
188188

189189
function imagefontwidth(int $font): int {}
190190

191191
function imagefontheight(int $font): int {}
192192

193-
function imagechar(GdImage $im, int $font, int $x, int $y, string $c, int $col): bool {}
193+
function imagechar(GdImage $image, int $font, int $x, int $y, string $char, int $color): bool {}
194194

195-
function imagecharup(GdImage $im, int $font, int $x, int $y, string $c, int $col): bool {}
195+
function imagecharup(GdImage $image, int $font, int $x, int $y, string $char, int $color): bool {}
196196

197-
function imagestring(GdImage $im, int $font, int $x, int $y, string $str, int $col): bool {}
197+
function imagestring(GdImage $image, int $font, int $x, int $y, string $string, int $color): bool {}
198198

199-
function imagestringup(GdImage $im, int $font, int $x, int $y, string $str, int $col): bool {}
199+
function imagestringup(GdImage $image, int $font, int $x, int $y, string $string, int $color): bool {}
200200

201-
function imagecopy(GdImage $dst_im, GdImage $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h): bool {}
201+
function imagecopy(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h): bool {}
202202

203-
function imagecopymerge(GdImage $dst_im, GdImage $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): bool {}
203+
function imagecopymerge(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): bool {}
204204

205-
function imagecopymergegray(GdImage $dst_im, GdImage $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): bool {}
205+
function imagecopymergegray(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): bool {}
206206

207-
function imagecopyresized(GdImage $dst_im, GdImage $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): bool {}
207+
function imagecopyresized(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): bool {}
208208

209-
function imagesx(GdImage $im): int {}
209+
function imagesx(GdImage $image): int {}
210210

211-
function imagesy(GdImage $im): int {}
211+
function imagesy(GdImage $image): int {}
212212

213-
function imagesetclip(GdImage $im, int $x1, int $x2, int $y1, int $y2): bool {}
213+
function imagesetclip(GdImage $image, int $x1, int $x2, int $y1, int $y2): bool {}
214214

215-
function imagegetclip(GdImage $im): array {}
215+
function imagegetclip(GdImage $image): array {}
216216

217217
#ifdef HAVE_GD_FREETYPE
218-
function imageftbbox(float $size, float $angle, string $font_file, string $text, array $extrainfo = []): array|false {}
218+
function imageftbbox(float $size, float $angle, string $font_file, string $text, array $extra_info = []): array|false {}
219219

220-
function imagefttext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text, array $extrainfo = []): array|false {}
220+
function imagefttext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_file, string $text, array $extra_info = []): array|false {}
221221

222222
/** @alias imageftbbox */
223-
function imagettfbbox(float $size, float $angle, string $font_file, string $text, array $extrainfo = []): array|false {}
223+
function imagettfbbox(float $size, float $angle, string $font_file, string $text, array $extra_info = []): array|false {}
224224

225225
/** @alias imagefttext */
226-
function imagettftext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text, array $extrainfo = []): array|false {}
226+
function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_file, string $text, array $extra_info = []): array|false {}
227227
#endif
228228

229229
/** @param array|int|float|bool $filter_args */
230-
function imagefilter(GdImage $im, int $filtertype, ...$filter_args): bool {}
230+
function imagefilter(GdImage $image, int $filter_type, ...$filter_args): bool {}
231231

232-
function imageconvolution(GdImage $im, array $matrix3x3, float $div, float $offset): bool {}
232+
function imageconvolution(GdImage $image, array $matrix, float $div, float $offset): bool {}
233233

234-
function imageflip(GdImage $im, int $mode): bool {}
234+
function imageflip(GdImage $image, int $mode): bool {}
235235

236-
function imageantialias(GdImage $im, bool $on): bool {}
236+
function imageantialias(GdImage $image, bool $enable): bool {}
237237

238-
function imagecrop(GdImage $im, array $rect): GdImage|false {}
238+
function imagecrop(GdImage $image, array $rectangle): GdImage|false {}
239239

240-
function imagecropauto(GdImage $im, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false {}
240+
function imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false {}
241241

242-
function imagescale(GdImage $im, int $new_width, int $new_height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false {}
242+
function imagescale(GdImage $image, int $new_width, int $new_height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false {}
243243

244-
function imageaffine(GdImage $im, array $affine, ?array $clip = null): GdImage|false {}
244+
function imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false {}
245245

246246
/** @param array|float $options */
247247
function imageaffinematrixget(int $type, $options): array|false {}
248248

249-
function imageaffinematrixconcat(array $m1, array $m2): array|false {}
249+
function imageaffinematrixconcat(array $matrix1, array $matrix2): array|false {}
250250

251-
function imagegetinterpolation(GdImage $im): int {}
251+
function imagegetinterpolation(GdImage $image): int {}
252252

253-
function imagesetinterpolation(GdImage $im, int $method = IMG_BILINEAR_FIXED): bool {}
253+
function imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool {}
254+
255+
function imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool {}
254256

255-
function imageresolution(GdImage $im, ?int $res_x = null, ?int $res_y = null): array|bool {}

0 commit comments

Comments
 (0)