Skip to content

Commit 5db1704

Browse files
committed
fixed docs
1 parent a5df117 commit 5db1704

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ $image->resize(2000, 2000, true, true); // enlarge to 4000x2000
7979

8080
### Crop
8181

82-
`Image::crop($width, $height = 0, $x = 'center', $y = 'middle')`
82+
`Image::crop($width, $height, $x = 'center', $y = 'middle')`
8383

8484
Crops the image:
8585

@@ -113,7 +113,7 @@ $image->crop(500, 200, Image::CROP_BALANCED); // The same as above but using the
113113

114114
### ResizeCrop
115115

116-
`Image::resizeCrop($width, $height = 0, $x = 'center', $y = 'middle', $enlarge = false)`
116+
`Image::resizeCrop($width, $height, $x = 'center', $y = 'middle', $enlarge = false)`
117117

118118
Resizes and crops the image. See [resize](resize) and [crop](crop) for the arguments description.
119119

src/Image.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,10 @@ public function resize($width, $height = 0, $enlarge = false, $cover = false)
306306
/**
307307
* Crops the image
308308
*
309-
* @param integer|string $width The new width of the image. It can be a number (pixels) or percentaje
310-
* @param integer|string $height The new height of the image. It can be a number (pixels) or percentaje
311-
* @param integer|string|null $x The "x" position to crop. Can be number (pixels), percentaje or (left,center,right). You can use any of the Image::CROP_* constants
312-
* @param integer|string|null $y The "y" position to crop. It can be number (pixels), percentaje or one of the available keywords (top,middle,bottom)
309+
* @param integer|string $width The new width of the image. It can be a number (pixels) or percentaje
310+
* @param integer|string $height The new height of the image. It can be a number (pixels) or percentaje
311+
* @param integer|string $x The "x" position to crop. It can be number (pixels), percentaje, [left, center, right] or one of the Image::CROP_* constants
312+
* @param integer|string $y The "y" position to crop. It can be number (pixels), percentaje or [top, middle, bottom]
313313
*
314314
* @return self
315315
*/
@@ -339,15 +339,15 @@ public function crop($width, $height, $x = 'center', $y = 'middle')
339339
/**
340340
* Adjust the image to the given dimmensions. Resizes and crops the image maintaining the proportions.
341341
*
342-
* @param integer|string $width The new width in number (pixels) or percentaje
343-
* @param integer|string $height The new height in number (pixels) or percentaje
344-
* @param integer|string|null $x The "x" position where start to crop. It can be number (pixels), percentaje or one of the available keywords (left,center,right)
345-
* @param integer|string|null $y The "y" position where start to crop. It can be number (pixels), percentaje or one of the available keywords (top,middle,bottom)
346-
* @param boolean|null $enlarge
342+
* @param integer|string $width The new width in number (pixels) or percentaje
343+
* @param integer|string $height The new height in number (pixels) or percentaje
344+
* @param integer|string $x The "x" position to crop. It can be number (pixels), percentaje, [left, center, right] or one of the Image::CROP_* constants
345+
* @param integer|string $y The "y" position to crop. It can be number (pixels), percentaje or [top, middle, bottom]
346+
* @param boolean $enlarge
347347
*
348348
* @return self
349349
*/
350-
public function resizeCrop($width, $height, $x = 'center', $y = 'middle', $enlarge = null)
350+
public function resizeCrop($width, $height, $x = 'center', $y = 'middle', $enlarge = false)
351351
{
352352
$this->resize($width, $height, $enlarge, true);
353353
$this->crop($width, $height, $x, $y);

0 commit comments

Comments
 (0)