@@ -76,7 +76,7 @@ private function getFormats(): array
7676 * @param File|null $image Optional file object to determine format; defaults to main image.
7777 * @return string The image file format.
7878 */
79- private function getImageFormat (File $ image = null ): string
79+ private function getImageFormat (File | null $ image = null ): string
8080 {
8181 $ image = $ image ?? $ this ->image ;
8282
@@ -123,7 +123,7 @@ private function getSrcsetPresetFromConfig(): array
123123 * @param File|null $image Optional file object; defaults to main image.
124124 * @return array Srcset preset with dynamic heights.
125125 */
126- private function getDynamicSrcsetPreset (string $ ratio = null , File $ image = null ): array
126+ private function getDynamicSrcsetPreset (string | null $ ratio = null , File | null $ image = null ): array
127127 {
128128 $ srcsetPreset = $ this ->getSrcsetPresetFromConfig ();
129129 ['x ' => $ ratioX , 'y ' => $ ratioY ] = getAspectRatio ($ ratio ?? $ this ->ratio , $ image ?? $ this ->image );
@@ -148,7 +148,7 @@ private function getDynamicSrcsetPreset(string $ratio = null, File $image = null
148148 * @param File|null $image Optional file object; defaults to main image.
149149 * @return string Srcset value string.
150150 */
151- private function getSrcsetValue (array $ srcsetPreset , File $ image = null ): string
151+ private function getSrcsetValue (array $ srcsetPreset , File | null $ image = null ): string
152152 {
153153 $ image = $ image ?? $ this ->image ;
154154
0 commit comments