@@ -58,7 +58,7 @@ public function preview(int $width, int $height): self
5858 * @param int|null $height in pixels.
5959 * @param string|null $mode one of the resize modes.
6060 */
61- public function resize (int $ width = null , int $ height = null , bool $ stretch = false , string $ mode = null ): self
61+ public function resize (int | null $ width = null , int | null $ height = null , bool $ stretch = false , string | null $ mode = null ): self
6262 {
6363 $ this ->transformations ['resize ' ] = Resize::transform ($ width , $ height , $ stretch , $ mode );
6464
@@ -86,7 +86,7 @@ public function smartResize(int $width, int $height): self
8686 * @param int $height in pixels or percents.
8787 * @param int|string $offsetX horizontal and vertical offsets in pixels or percents (e.g. 50p) or shortcuts.
8888 */
89- public function crop (int |string $ width , int |string $ height , int |string $ offsetX = null , int |string $ offsetY = null ): self
89+ public function crop (int |string $ width , int |string $ height , int |string | null $ offsetX = null , int |string | null $ offsetY = null ): self
9090 {
9191 $ this ->transformations ['crop ' ] = Crop::transform ($ width , $ height , $ offsetX , $ offsetY );
9292
@@ -100,7 +100,7 @@ public function crop(int|string $width, int|string $height, int|string $offsetX
100100 * @param int|string $offsetX horizontal and vertical offsets in pixels or percents or shortcuts.
101101 * @param string|null $offsetY horizontal and vertical offsets in percents.
102102 */
103- public function cropByRatio (string $ ratio , int |string $ offsetX = null , string |null $ offsetY = null ): self
103+ public function cropByRatio (string $ ratio , int |string | null $ offsetX = null , string |null $ offsetY = null ): self
104104 {
105105 $ this ->transformations ['crop_by_ratio ' ] = CropByRatio::transform ($ ratio , $ offsetX , $ offsetY );
106106
@@ -117,7 +117,7 @@ public function cropByRatio(string $ratio, int|string $offsetX = null, string|nu
117117 * @param int|string $offsetX horizontal and vertical offsets in percents or shortcuts.
118118 * @param string|null $offsetY horizontal and vertical offsets in percents.
119119 */
120- public function cropByObjects (string $ tag , string $ ratio = null , string $ width = null , string $ height = null , int |string $ offsetX = null , string |null $ offsetY = null ): self
120+ public function cropByObjects (string $ tag , string | null $ ratio = null , string | null $ width = null , string | null $ height = null , int |string | null $ offsetX = null , string |null $ offsetY = null ): self
121121 {
122122 $ this ->transformations ['crop_by_objects ' ] = CropByObjects::transform ($ tag , $ ratio , $ width , $ height , $ offsetX , $ offsetY );
123123
@@ -132,7 +132,7 @@ public function cropByObjects(string $tag, string $ratio = null, string $width =
132132 * @param string $offsetX horizontal and vertical offsets in percents or shortcuts.
133133 * @param string|null $offsetY horizontal and vertical offsets in percents.
134134 */
135- public function scaleCrop (int $ width , int $ height , string $ offsetX = null , string |null $ offsetY = null ): self
135+ public function scaleCrop (int $ width , int $ height , string | null $ offsetX = null , string |null $ offsetY = null ): self
136136 {
137137 $ this ->transformations ['scale_crop ' ] = ScaleCrop::transform ($ width , $ height , $ offsetX , $ offsetY );
138138
@@ -148,7 +148,7 @@ public function scaleCrop(int $width, int $height, string $offsetX = null, strin
148148 * @param string $offsetX horizontal and vertical offsets in percents or shortcuts.
149149 * @param string|null $offsetY horizontal and vertical offsets in percents.
150150 */
151- public function smartCrop (int $ width , int $ height , string $ type , string $ offsetX = null , string |null $ offsetY = null ): self
151+ public function smartCrop (int $ width , int $ height , string $ type , string | null $ offsetX = null , string |null $ offsetY = null ): self
152152 {
153153 $ this ->transformations ['smart_crop ' ] = SmartCrop::transform ($ width , $ height , $ type , $ offsetX , $ offsetY );
154154
@@ -281,7 +281,7 @@ public function iccProfileSizeThreshold(int $number = 10): self
281281 * @param string $name one of the filters.
282282 * @param int $value optional value for the filter.
283283 */
284- public function filter (string $ name , int $ value = null ): self
284+ public function filter (string $ name , int | null $ value = null ): self
285285 {
286286 $ this ->transformations ['filter ' ] = Filter::transform ($ name , $ value );
287287
@@ -291,7 +291,7 @@ public function filter(string $name, int $value = null): self
291291 /**
292292 * Blurs images by the :strength factor.
293293 */
294- public function blur (int $ strength = null , int $ amount = null ): self
294+ public function blur (int | null $ strength = null , int | null $ amount = null ): self
295295 {
296296 $ this ->transformations ['blur ' ] = Blur::transform ($ strength , $ amount );
297297
@@ -306,7 +306,7 @@ public function blur(int $strength = null, int $amount = null): self
306306 * @param int $coordinateX in pixels or percentages.
307307 * @param int $coordinateY in pixels or percentages.
308308 */
309- public function blurRegion (int $ dimensionX , int |string $ dimensionY , int |string $ coordinateX , int |string $ coordinateY , int $ strength = null ): self
309+ public function blurRegion (int $ dimensionX , int |string $ dimensionY , int |string $ coordinateX , int |string $ coordinateY , int | null $ strength = null ): self
310310 {
311311 $ this ->transformations ['blur_region ' ] = BlurRegion::transform ($ dimensionX , $ dimensionY , $ coordinateX , $ coordinateY , $ strength );
312312
@@ -316,7 +316,7 @@ public function blurRegion(int $dimensionX, int|string $dimensionY, int|string $
316316 /**
317317 * When faces is specified the regions are selected automatically by utilizing face detection.
318318 */
319- public function blurFaces (int $ strength = null ): self
319+ public function blurFaces (int | null $ strength = null ): self
320320 {
321321 $ this ->transformations ['blur_faces ' ] = BlurFaces::transform ($ strength );
322322
@@ -326,7 +326,7 @@ public function blurFaces(int $strength = null): self
326326 /**
327327 * Sharpens an image, might be especially useful with images that were subjected to downscaling.
328328 */
329- public function sharpen (int $ strength = null ): self
329+ public function sharpen (int | null $ strength = null ): self
330330 {
331331 $ this ->transformations ['sharpen ' ] = Sharpen::transform ($ strength );
332332
0 commit comments