From a103b5bb80020e94f91354a8b7a855f6636139f6 Mon Sep 17 00:00:00 2001 From: Marv Blackwell Date: Fri, 5 Jan 2018 15:05:47 +0000 Subject: [PATCH] brings docblock in line with documentation, re: $image->resize(300, null, function($constraint) { /* stuff */ }) and $image->resize(300), stopping phpstan flagging Parameter #2 $height of method Intervention\Image\Image::resize() expects int, null given. --- src/Intervention/Image/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Intervention/Image/Image.php b/src/Intervention/Image/Image.php index c898362d..de0a9965 100644 --- a/src/Intervention/Image/Image.php +++ b/src/Intervention/Image/Image.php @@ -40,7 +40,7 @@ use Psr\Http\Message\StreamInterface; * @method \Intervention\Image\Image polygon(array $points, \Closure $callback = null) Draw a colored polygon with given points. You can define the appearance of the polygon by an optional closure callback. * @method \Intervention\Image\Image rectangle(integer $x1, integer $y1, integer $x2, integer $y2, \Closure $callback = null) Draw a colored rectangle on current image with top-left corner on x,y point 1 and bottom-right corner at x,y point 2. Define the overall appearance of the shape by passing a Closure callback as an optional parameter. * @method \Intervention\Image\Image reset(string $name = 'default') Resets all of the modifications to a state saved previously by backup under an optional name. - * @method \Intervention\Image\Image resize(integer $width, integer $height, \Closure $callback = null) Resizes current image based on given width and/or height. To contraint the resize command, pass an optional Closure callback as third parameter. + * @method \Intervention\Image\Image resize(integer $width, integer $height = null, \Closure $callback = null) Resizes current image based on given width and/or height. To contraint the resize command, pass an optional Closure callback as third parameter. * @method \Intervention\Image\Image resizeCanvas(integer $width, integer $height, string $anchor = 'center', boolean $relative = false, mixed $bgcolor = null) Resize the boundaries of the current image to given width and height. An anchor can be defined to determine from what point of the image the resizing is going to happen. Set the mode to relative to add or subtract the given width or height to the actual image dimensions. You can also pass a background color for the emerging area of the image. * @method mixed response(string $format = null, integer $quality = 90) Sends HTTP response with current image in given format and quality. * @method \Intervention\Image\Image rotate(float $angle, mixed $bgcolor = null) Rotate the current image counter-clockwise by a given angle. Optionally define a background color for the uncovered zone after the rotation.