Skip to content

Commit e071f7b

Browse files
committed
remove Enum\ prefix from @method lines
since we have them in the use declaration
1 parent 2046293 commit e071f7b

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

examples/generate_phpdoc.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ def to_php
6868
# is there a "Vips" at the front of the type name? remove it and try the
6969
# enums again
7070
trim = type.to_s.tap{|s| s.slice!("Vips")}
71-
return "Enum\\" + trim if $enums.include?(trim)
71+
return trim if $enums.include?(trim)
7272

7373
# is there a "::" at the front of the type name? remove it and try the
7474
# enums again
7575
trim.slice! "::"
76-
return "Enum\\" + trim if $enums.include?(trim)
76+
return trim if $enums.include?(trim)
7777

7878
# no mapping found
7979
puts "no mapping found for #{type}"

src/ImageAutodoc.php

+22-22
Original file line numberDiff line numberDiff line change
@@ -86,24 +86,24 @@
8686
* @link https://github.com/jcupitt/php-vips
8787
*
8888
* @method static void system(string $cmd_format, array $options = []) Run an external command.
89-
* @method Image relational(Image $right, Enum\OperationRelational $relational, array $options = []) Relational operation on two images.
90-
* @method Image boolean(Image $right, Enum\OperationBoolean $boolean, array $options = []) Boolean operation on two images.
91-
* @method Image math2(Image $right, Enum\OperationMath2 $math2, array $options = []) Binary math operations.
92-
* @method Image complex2(Image $right, Enum\OperationComplex2 $cmplx, array $options = []) Complex binary operations on two images.
89+
* @method Image relational(Image $right, OperationRelational $relational, array $options = []) Relational operation on two images.
90+
* @method Image boolean(Image $right, OperationBoolean $boolean, array $options = []) Boolean operation on two images.
91+
* @method Image math2(Image $right, OperationMath2 $math2, array $options = []) Binary math operations.
92+
* @method Image complex2(Image $right, OperationComplex2 $cmplx, array $options = []) Complex binary operations on two images.
9393
* @method Image complexform(Image $right, array $options = []) Form a complex image from two real images.
9494
* @method static Image sum(array $in, array $options = []) Sum an array of images.
9595
* @method Image invert(array $options = []) Invert an image.
9696
* @method Image linear(array $a, array $b, array $options = []) Calculate (a * in + b).
97-
* @method Image math(Enum\OperationMath $math, array $options = []) Apply a math operation to an image.
97+
* @method Image math(OperationMath $math, array $options = []) Apply a math operation to an image.
9898
* @method Image abs(array $options = []) Absolute value of an image.
9999
* @method Image sign(array $options = []) Unit vector of pixel.
100-
* @method Image round(Enum\OperationRound $round, array $options = []) Perform a round function on an image.
101-
* @method Image relational_const(array $c, Enum\OperationRelational $relational, array $options = []) Relational operations against a constant.
100+
* @method Image round(OperationRound $round, array $options = []) Perform a round function on an image.
101+
* @method Image relational_const(array $c, OperationRelational $relational, array $options = []) Relational operations against a constant.
102102
* @method Image remainder_const(array $c, array $options = []) Remainder after integer division of an image and a constant.
103-
* @method Image boolean_const(array $c, Enum\OperationBoolean $boolean, array $options = []) Boolean operations against a constant.
104-
* @method Image math2_const(array $c, Enum\OperationMath2 $math2, array $options = []) Pow( @in, @c ).
105-
* @method Image complex(Enum\OperationComplex $cmplx, array $options = []) Perform a complex operation on an image.
106-
* @method Image complexget(Enum\OperationComplexget $get, array $options = []) Get a component from a complex image.
103+
* @method Image boolean_const(array $c, OperationBoolean $boolean, array $options = []) Boolean operations against a constant.
104+
* @method Image math2_const(array $c, OperationMath2 $math2, array $options = []) Pow( @in, @c ).
105+
* @method Image complex(OperationComplex $cmplx, array $options = []) Perform a complex operation on an image.
106+
* @method Image complexget(OperationComplexget $get, array $options = []) Get a component from a complex image.
107107
* @method float avg(array $options = []) Find image average.
108108
* @method float min(array $options = []) Find image minimum.
109109
* @method float max(array $options = []) Find image maximum.
@@ -124,17 +124,17 @@
124124
* @method Image sequential(array $options = []) Check sequential access.
125125
* @method Image cache(array $options = []) Cache an image.
126126
* @method Image embed(integer $x, integer $y, integer $width, integer $height, array $options = []) Embed an image in a larger image.
127-
* @method Image flip(Enum\Direction $direction, array $options = []) Flip an image.
127+
* @method Image flip(Direction $direction, array $options = []) Flip an image.
128128
* @method Image insert(Image $sub, integer $x, integer $y, array $options = []) Insert image @sub into @main at @x, @y.
129-
* @method Image join(Image $in2, Enum\Direction $direction, array $options = []) Join a pair of images.
129+
* @method Image join(Image $in2, Direction $direction, array $options = []) Join a pair of images.
130130
* @method static Image arrayjoin(array $in, array $options = []) Join an array of images.
131131
* @method Image extract_band(integer $band, array $options = []) Extract band from an image.
132132
* @method Image bandjoin_const(array $c, array $options = []) Append a constant band to an image.
133133
* @method Image bandmean(array $options = []) Band-wise average.
134-
* @method Image bandbool(Enum\OperationBoolean $boolean, array $options = []) Boolean operation across image bands.
134+
* @method Image bandbool(OperationBoolean $boolean, array $options = []) Boolean operation across image bands.
135135
* @method Image replicate(integer $across, integer $down, array $options = []) Replicate an image.
136-
* @method Image cast(Enum\BandFormat $format, array $options = []) Cast an image.
137-
* @method Image rot(Enum\Angle $angle, array $options = []) Rotate an image.
136+
* @method Image cast(BandFormat $format, array $options = []) Cast an image.
137+
* @method Image rot(Angle $angle, array $options = []) Rotate an image.
138138
* @method Image rot45(array $options = []) Rotate an image.
139139
* @method Image autorot(array $options = []) Autorotate image by exif tag.
140140
* @method Image recomb(Image $m, array $options = []) Linear recombination with matrix.
@@ -238,7 +238,7 @@
238238
* @method Image affine(array $matrix, array $options = []) Affine transform of an image.
239239
* @method Image similarity(array $options = []) Similarity transform of an image.
240240
* @method Image resize(float $scale, array $options = []) Resize an image.
241-
* @method Image colourspace(Enum\Interpretation $space, array $options = []) Convert to a new colourspace.
241+
* @method Image colourspace(Interpretation $space, array $options = []) Convert to a new colourspace.
242242
* @method Image Lab2XYZ(array $options = []) Transform cielab to xyz.
243243
* @method Image XYZ2Lab(array $options = []) Transform xyz to lab.
244244
* @method Image Lab2LCh(array $options = []) Transform lab to lch.
@@ -296,9 +296,9 @@
296296
* @method Image freqmult(Image $mask, array $options = []) Frequency-domain filtering.
297297
* @method Image spectrum(array $options = []) Make displayable power spectrum.
298298
* @method Image phasecor(Image $in2, array $options = []) Calculate phase correlation.
299-
* @method Image morph(Image $mask, Enum\OperationMorphology $morph, array $options = []) Morphology operation.
299+
* @method Image morph(Image $mask, OperationMorphology $morph, array $options = []) Morphology operation.
300300
* @method Image rank(integer $width, integer $height, integer $index, array $options = []) Rank filter.
301-
* @method float countlines(Enum\Direction $direction, array $options = []) Count lines in an image.
301+
* @method float countlines(Direction $direction, array $options = []) Count lines in an image.
302302
* @method Image labelregions(array $options = []) Label regions in an image.
303303
* @method Image draw_rect(array $ink, integer $left, integer $top, integer $width, integer $height, array $options = []) Paint a rectangle on an image.
304304
* @method Image draw_mask(array $ink, Image $mask, integer $x, integer $y, array $options = []) Draw a mask on an image.
@@ -307,9 +307,9 @@
307307
* @method Image draw_flood(array $ink, integer $x, integer $y, array $options = []) Flood-fill an area.
308308
* @method Image draw_image(Image $sub, integer $x, integer $y, array $options = []) Paint an image into another image.
309309
* @method Image draw_smudge(integer $left, integer $top, integer $width, integer $height, array $options = []) Blur a rectangle on an image.
310-
* @method Image merge(Image $sec, Enum\Direction $direction, integer $dx, integer $dy, array $options = []) Merge two images.
311-
* @method Image mosaic(Image $sec, Enum\Direction $direction, integer $xref, integer $yref, integer $xsec, integer $ysec, array $options = []) Mosaic two images.
312-
* @method Image mosaic1(Image $sec, Enum\Direction $direction, integer $xr1, integer $yr1, integer $xs1, integer $ys1, integer $xr2, integer $yr2, integer $xs2, integer $ys2, array $options = []) First-order mosaic of two images.
310+
* @method Image merge(Image $sec, Direction $direction, integer $dx, integer $dy, array $options = []) Merge two images.
311+
* @method Image mosaic(Image $sec, Direction $direction, integer $xref, integer $yref, integer $xsec, integer $ysec, array $options = []) Mosaic two images.
312+
* @method Image mosaic1(Image $sec, Direction $direction, integer $xr1, integer $yr1, integer $xs1, integer $ys1, integer $xr2, integer $yr2, integer $xs2, integer $ys2, array $options = []) First-order mosaic of two images.
313313
* @method Image match(Image $sec, integer $xr1, integer $yr1, integer $xs1, integer $ys1, integer $xr2, integer $yr2, integer $xs2, integer $ys2, array $options = []) First-order match of two images.
314314
* @method Image globalbalance(array $options = []) Global balance an image mosaic.
315315
* @method Image extract_area(integer $left, integer $top, integer $width, integer $height, array $options = []) Extract an area from an image.

0 commit comments

Comments
 (0)