Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Block/Product/ImageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions Block/Product/View/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ 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);
}

/**
* 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
Expand All @@ -49,7 +49,7 @@ public function preloadMobileImage($imageUrl, $isBase64 = false)

/**
* Check if base64 image encoding is enabled
*
*
* @return bool
*/
public function isBase64ImageEnabled()
Expand Down