@@ -80,15 +80,10 @@ abstract protected function getLinkType(): int;
8080 * @param \Magento\Catalog\Api\Data\ProductInterface[] $products
8181 * @param string[] $loadAttributes
8282 * @param int $linkType
83- * @param ContextInterface $context
8483 * @return \Magento\Catalog\Api\Data\ProductInterface[][]
8584 */
86- private function findRelations (
87- array $ products ,
88- array $ loadAttributes ,
89- int $ linkType ,
90- ContextInterface $ context
91- ): array {
85+ private function findRelations (array $ products , array $ loadAttributes , int $ linkType ): array
86+ {
9287 //Loading relations
9388 $ relations = $ this ->relatedProductDataProvider ->getRelations ($ products , $ linkType );
9489 if (!$ relations ) {
@@ -101,8 +96,7 @@ private function findRelations(
10196 $ this ->searchCriteriaBuilder ->create (),
10297 $ loadAttributes ,
10398 false ,
104- true ,
105- $ context
99+ true
106100 );
107101 //Filling related products map.
108102 /** @var \Magento\Catalog\Api\Data\ProductInterface[] $relatedProducts */
@@ -150,7 +144,7 @@ public function resolve(ContextInterface $context, Field $field, array $requests
150144 $ fields = array_unique (array_merge ([], ...$ fields ));
151145
152146 //Finding relations.
153- $ related = $ this ->findRelations ($ products , $ fields , $ this ->getLinkType (), $ context );
147+ $ related = $ this ->findRelations ($ products , $ fields , $ this ->getLinkType ());
154148
155149 //Matching requests with responses.
156150 $ response = new BatchResponse ();
0 commit comments