Skip to content

Commit cc55934

Browse files
committed
GraphQL-334: Changed hard coded values according to TYPE_CODE
-- fix static tests
1 parent 14dec59 commit cc55934

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

app/code/Magento/BundleGraphQl/Model/BundleProductTypeResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
use Magento\Bundle\Model\Product\Type as Type;
1212

1313
/**
14-
* {@inheritdoc}
14+
* @inheritdoc
1515
*/
1616
class BundleProductTypeResolver implements TypeResolverInterface
1717
{
1818
const BUNDLE_PRODUCT = 'BundleProduct';
1919

2020
/**
21-
* {@inheritdoc}
21+
* @inheritdoc
2222
*/
2323
public function resolveType(array $data) : string
2424
{

app/code/Magento/ConfigurableProductGraphQl/Model/Resolver/ConfigurableVariant.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ public function __construct(
7171
}
7272

7373
/**
74-
* Fetch and format configurable variants.
75-
*
76-
* {@inheritDoc}
74+
* @inheritdoc
7775
*/
7876
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
7977
{

app/code/Magento/ConfigurableProductGraphQl/Model/Resolver/Variant/Attributes.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
namespace Magento\ConfigurableProductGraphQl\Model\Resolver\Variant;
99

10+
use Magento\Framework\GraphQl\Query\Resolver\ContextInterface;
11+
use Magento\Framework\GraphQl\Query\Resolver\Value;
1012
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
1113
use Magento\Framework\GraphQl\Config\Element\Field;
1214
use Magento\Framework\GraphQl\Query\ResolverInterface;
@@ -19,7 +21,15 @@ class Attributes implements ResolverInterface
1921
/**
2022
* Format product's option data to conform to GraphQL schema
2123
*
22-
* {@inheritdoc}
24+
* @inheritdoc
25+
*
26+
* @param Field $field
27+
* @param ContextInterface $context
28+
* @param ResolveInfo $info
29+
* @param array|null $value
30+
* @param array|null $args
31+
* @throws \Exception
32+
* @return mixed|Value
2333
*/
2434
public function resolve(
2535
Field $field,

app/code/Magento/ConfigurableProductGraphQl/Model/Variant/Collection.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ public function addParentProduct(Product $product) : void
9696

9797
if (!empty($this->childrenMap)) {
9898
$this->childrenMap = [];
99-
10099
}
101100
$this->parentProducts[$product->getId()] = $product;
102101
}

app/code/Magento/DownloadableGraphQl/Model/DownloadableProductTypeResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
use Magento\Downloadable\Model\Product\Type as Type;
1212

1313
/**
14-
* {@inheritdoc}
14+
* @inheritdoc
1515
*/
1616
class DownloadableProductTypeResolver implements TypeResolverInterface
1717
{
1818
const DOWNLOADABLE_PRODUCT = 'DownloadableProduct';
1919
/**
20-
* {@inheritdoc}
20+
* @inheritdoc
2121
*/
2222
public function resolveType(array $data) : string
2323
{

app/code/Magento/GroupedProductGraphQl/Model/GroupedProductTypeResolver.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99

1010
use Magento\Framework\GraphQl\Query\Resolver\TypeResolverInterface;
1111
use Magento\GroupedProduct\Model\Product\Type\Grouped as Type;
12+
1213
/**
13-
* {@inheritdoc}
14+
* @inheritdoc
1415
*/
1516
class GroupedProductTypeResolver implements TypeResolverInterface
1617
{
1718
const GROUPED_PRODUCT = 'GroupedProduct';
1819
/**
19-
* {@inheritdoc}
20+
* @inheritdoc
2021
*/
2122
public function resolveType(array $data) : string
2223
{

0 commit comments

Comments
 (0)