src/Charcoal/Image/Effect/AbstractResizeEffect.php 1 location
|
@@ 163-172 (lines=10) @@
|
160 |
|
* @throws InvalidArgumentException If the height argument is not numeric or lower than 0. |
161 |
|
* @return Rotate Chainable |
162 |
|
*/ |
163 |
|
public function setHeight($height) |
164 |
|
{ |
165 |
|
if (!is_int($height) || ($height < 0)) { |
166 |
|
throw new InvalidArgumentException( |
167 |
|
'Height must be a positive integer' |
168 |
|
); |
169 |
|
} |
170 |
|
$this->height = (int)$height; |
171 |
|
return $this; |
172 |
|
} |
173 |
|
|
174 |
|
/** |
175 |
|
* @return float |
src/Charcoal/Image/Effect/AbstractCropEffect.php 1 location
|
@@ 79-88 (lines=10) @@
|
76 |
|
* @throws InvalidArgumentException If the height argument is not valid. |
77 |
|
* @return AbstractCropEffect |
78 |
|
*/ |
79 |
|
public function setHeight($height) |
80 |
|
{ |
81 |
|
if (!is_int($height) || ($height < 0)) { |
82 |
|
throw new InvalidArgumentException( |
83 |
|
'Height must be a positive integer' |
84 |
|
); |
85 |
|
} |
86 |
|
$this->height = $height; |
87 |
|
return $this; |
88 |
|
} |
89 |
|
|
90 |
|
/** |
91 |
|
* @return integer |