diff --git a/Block/Product/ImageFactory.php b/Block/Product/ImageFactory.php index 280fb2d..a072e3a 100755 --- a/Block/Product/ImageFactory.php +++ b/Block/Product/ImageFactory.php @@ -137,7 +137,7 @@ private function getLabel(Product $product, string $imageType): string * @param array|null $attributes * @return ImageBlock */ - public function create(Product $product, string $imageId, array $attributes = null): ImageBlock + public function create(Product $product, string $imageId, ?array $attributes = null): ImageBlock { $viewImageConfig = $this->presentationConfig->getViewConfig()->getMediaAttributes( 'Magento_Catalog', diff --git a/Block/Product/View/Gallery.php b/Block/Product/View/Gallery.php index 8589171..731d6a9 100644 --- a/Block/Product/View/Gallery.php +++ b/Block/Product/View/Gallery.php @@ -26,7 +26,7 @@ public function __construct( \Magento\Framework\Json\EncoderInterface $jsonEncoder, ImagePreload $imagePreload, array $data = [], - \Magento\Catalog\Model\Product\Image\UrlBuilder $urlBuilder = null + ?\Magento\Catalog\Model\Product\Image\UrlBuilder $urlBuilder = null ) { $this->imagePreload = $imagePreload; parent::__construct($context, $arrayUtils, $jsonEncoder, $data, null, [], $urlBuilder); @@ -34,7 +34,7 @@ public function __construct( /** * Preload mobile hero image using HTTP Link header - * + * * @param string $imageUrl The URL of the image to preload * @param bool $isBase64 Whether the image is base64 encoded * @return void @@ -49,7 +49,7 @@ public function preloadMobileImage($imageUrl, $isBase64 = false) /** * Check if base64 image encoding is enabled - * + * * @return bool */ public function isBase64ImageEnabled()