File tree 2 files changed +2
-4
lines changed
app/code/Magento/ConfigurableProduct
Block/Plugin/Product/Media
Test/Unit/Block/Plugin/Product/Media
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function afterGetOptionsMediaGalleryDataJson(
56
56
* @param Product $product
57
57
* @return array
58
58
*/
59
- private function getProductGallery ($ product )
59
+ private function getProductGallery (Product $ product ): array
60
60
{
61
61
$ result = [];
62
62
$ images = $ this ->getImagesOrderedByPosition ($ product );
@@ -74,7 +74,7 @@ private function getProductGallery($product)
74
74
* @param Product $product
75
75
* @return array
76
76
*/
77
- private function getImagesOrderedByPosition ($ product )
77
+ private function getImagesOrderedByPosition (Product $ product ): array
78
78
{
79
79
$ imagesCollection = $ product ->getMediaGalleryImages ();
80
80
$ images = $ imagesCollection ->getItems ();
Original file line number Diff line number Diff line change @@ -46,8 +46,6 @@ public function testAfterGetOptions()
46
46
->disableOriginalConstructor ()
47
47
->onlyMethods (['getItems ' ])
48
48
->getMock ();
49
-
50
-
51
49
$ galleryMock ->expects (($ this ->any ()))->method ('getProduct ' )->willReturn ($ productMock );
52
50
$ productMock ->expects ($ this ->once ())->method ('getTypeId ' )->willReturn ('configurable ' );
53
51
$ productMock ->expects ($ this ->once ())->method ('getTypeInstance ' )->willReturn ($ configurableTypeMock );
You can’t perform that action at this time.
0 commit comments