@@ -57,7 +57,7 @@ final class Image
5757 private ?string $ orient ;
5858 private ?string $ mime ;
5959
60- public function __construct (\GdImage |string | null $ filename = null , bool $ strict = false )
60+ public function __construct (null | \GdImage |string $ filename = null , bool $ strict = false )
6161 {
6262 Helper::checkGD ();
6363
@@ -227,7 +227,7 @@ public function loadString(?string $imageString, bool $strict = false): self
227227 * Load image resource.
228228 * @param null|\GdImage|string $imageRes Image GD Resource
229229 */
230- public function loadResource (\GdImage |string | null $ imageRes = null ): self
230+ public function loadResource (null | \GdImage |string $ imageRes = null ): self
231231 {
232232 if (!$ imageRes instanceof \GdImage) {
233233 throw new Exception ('Image is not GD resource! ' );
@@ -280,7 +280,7 @@ public function isSquare(): bool
280280 * @param null|array|string $color Hex color string, array(red, green, blue) or array(red, green, blue, alpha).
281281 * Where red, green, blue - integers 0-255, alpha - integer 0-127
282282 */
283- public function create (int $ width , ?int $ height = null , array |string | null $ color = null ): self
283+ public function create (int $ width , ?int $ height = null , null | array |string $ color = null ): self
284284 {
285285 $ this ->cleanup ();
286286
@@ -810,7 +810,7 @@ private function renderImageByFormat(
810810 * Get metadata of image or base64 string.
811811 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
812812 */
813- private function loadMeta (\GdImage |string | null $ image = null , bool $ strict = false ): self
813+ private function loadMeta (null | \GdImage |string $ image = null , bool $ strict = false ): self
814814 {
815815 // Gather meta data
816816 if ($ image === null && $ this ->filename !== null && $ this ->filename !== '' ) {
0 commit comments