@@ -58,7 +58,7 @@ public function preview(int $width, int $height): self
58
58
* @param int|null $height in pixels.
59
59
* @param string|null $mode one of the resize modes.
60
60
*/
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
62
62
{
63
63
$ this ->transformations ['resize ' ] = Resize::transform ($ width , $ height , $ stretch , $ mode );
64
64
@@ -86,7 +86,7 @@ public function smartResize(int $width, int $height): self
86
86
* @param int $height in pixels or percents.
87
87
* @param int|string $offsetX horizontal and vertical offsets in pixels or percents (e.g. 50p) or shortcuts.
88
88
*/
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
90
90
{
91
91
$ this ->transformations ['crop ' ] = Crop::transform ($ width , $ height , $ offsetX , $ offsetY );
92
92
@@ -100,7 +100,7 @@ public function crop(int|string $width, int|string $height, int|string $offsetX
100
100
* @param int|string $offsetX horizontal and vertical offsets in pixels or percents or shortcuts.
101
101
* @param string|null $offsetY horizontal and vertical offsets in percents.
102
102
*/
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
104
104
{
105
105
$ this ->transformations ['crop_by_ratio ' ] = CropByRatio::transform ($ ratio , $ offsetX , $ offsetY );
106
106
@@ -117,7 +117,7 @@ public function cropByRatio(string $ratio, int|string $offsetX = null, string|nu
117
117
* @param int|string $offsetX horizontal and vertical offsets in percents or shortcuts.
118
118
* @param string|null $offsetY horizontal and vertical offsets in percents.
119
119
*/
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
121
121
{
122
122
$ this ->transformations ['crop_by_objects ' ] = CropByObjects::transform ($ tag , $ ratio , $ width , $ height , $ offsetX , $ offsetY );
123
123
@@ -132,7 +132,7 @@ public function cropByObjects(string $tag, string $ratio = null, string $width =
132
132
* @param string $offsetX horizontal and vertical offsets in percents or shortcuts.
133
133
* @param string|null $offsetY horizontal and vertical offsets in percents.
134
134
*/
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
136
136
{
137
137
$ this ->transformations ['scale_crop ' ] = ScaleCrop::transform ($ width , $ height , $ offsetX , $ offsetY );
138
138
@@ -148,7 +148,7 @@ public function scaleCrop(int $width, int $height, string $offsetX = null, strin
148
148
* @param string $offsetX horizontal and vertical offsets in percents or shortcuts.
149
149
* @param string|null $offsetY horizontal and vertical offsets in percents.
150
150
*/
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
152
152
{
153
153
$ this ->transformations ['smart_crop ' ] = SmartCrop::transform ($ width , $ height , $ type , $ offsetX , $ offsetY );
154
154
@@ -281,7 +281,7 @@ public function iccProfileSizeThreshold(int $number = 10): self
281
281
* @param string $name one of the filters.
282
282
* @param int $value optional value for the filter.
283
283
*/
284
- public function filter (string $ name , int $ value = null ): self
284
+ public function filter (string $ name , int | null $ value = null ): self
285
285
{
286
286
$ this ->transformations ['filter ' ] = Filter::transform ($ name , $ value );
287
287
@@ -291,7 +291,7 @@ public function filter(string $name, int $value = null): self
291
291
/**
292
292
* Blurs images by the :strength factor.
293
293
*/
294
- public function blur (int $ strength = null , int $ amount = null ): self
294
+ public function blur (int | null $ strength = null , int | null $ amount = null ): self
295
295
{
296
296
$ this ->transformations ['blur ' ] = Blur::transform ($ strength , $ amount );
297
297
@@ -306,7 +306,7 @@ public function blur(int $strength = null, int $amount = null): self
306
306
* @param int $coordinateX in pixels or percentages.
307
307
* @param int $coordinateY in pixels or percentages.
308
308
*/
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
310
310
{
311
311
$ this ->transformations ['blur_region ' ] = BlurRegion::transform ($ dimensionX , $ dimensionY , $ coordinateX , $ coordinateY , $ strength );
312
312
@@ -316,7 +316,7 @@ public function blurRegion(int $dimensionX, int|string $dimensionY, int|string $
316
316
/**
317
317
* When faces is specified the regions are selected automatically by utilizing face detection.
318
318
*/
319
- public function blurFaces (int $ strength = null ): self
319
+ public function blurFaces (int | null $ strength = null ): self
320
320
{
321
321
$ this ->transformations ['blur_faces ' ] = BlurFaces::transform ($ strength );
322
322
@@ -326,7 +326,7 @@ public function blurFaces(int $strength = null): self
326
326
/**
327
327
* Sharpens an image, might be especially useful with images that were subjected to downscaling.
328
328
*/
329
- public function sharpen (int $ strength = null ): self
329
+ public function sharpen (int | null $ strength = null ): self
330
330
{
331
331
$ this ->transformations ['sharpen ' ] = Sharpen::transform ($ strength );
332
332
0 commit comments