Skip to content

Commit 1b11a71

Browse files
committed
refactoring
1 parent 24adb14 commit 1b11a71

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/code/Magento/ConfigurableProduct/Block/Plugin/Product/Media/Gallery.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function afterGetOptionsMediaGalleryDataJson(
5656
* @param Product $product
5757
* @return array
5858
*/
59-
private function getProductGallery($product)
59+
private function getProductGallery(Product $product): array
6060
{
6161
$result = [];
6262
$images = $this->getImagesOrderedByPosition($product);
@@ -74,7 +74,7 @@ private function getProductGallery($product)
7474
* @param Product $product
7575
* @return array
7676
*/
77-
private function getImagesOrderedByPosition($product)
77+
private function getImagesOrderedByPosition(Product $product): array
7878
{
7979
$imagesCollection = $product->getMediaGalleryImages();
8080
$images = $imagesCollection->getItems();

app/code/Magento/ConfigurableProduct/Test/Unit/Block/Plugin/Product/Media/GalleryTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ public function testAfterGetOptions()
4646
->disableOriginalConstructor()
4747
->onlyMethods(['getItems'])
4848
->getMock();
49-
50-
5149
$galleryMock->expects(($this->any()))->method('getProduct')->willReturn($productMock);
5250
$productMock->expects($this->once())->method('getTypeId')->willReturn('configurable');
5351
$productMock->expects($this->once())->method('getTypeInstance')->willReturn($configurableTypeMock);

0 commit comments

Comments
 (0)