Skip to content

Commit 8bffe43

Browse files
author
Eric Bohanon
committed
MAGETWO-83872: Write metadata service
1 parent 51cfd2d commit 8bffe43

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

app/code/Magento/GraphQl/Model/FieldConfig.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function __construct(ArgumentConfigFactory $argumentConfigFactory, array
4444
* @param string $fieldName
4545
* @param array $arguments
4646
* @return ArgumentConfig[]
47+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
4748
*/
4849
public function getFieldConfig(string $fieldName, array $arguments)
4950
{

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductAttributeTypeTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ public function testComplexAttributeTypeResolver()
141141
* For undefined attributes and for attributes with no backendModel mapping available
142142
*
143143
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
144+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
144145
*/
145146
public function testUnDefinedAttributeType()
146147
{
@@ -177,17 +178,16 @@ public function testUnDefinedAttributeType()
177178
$expectedAttributeCodes = ['media_gallery', 'undefine_attribute', 'special_price'];
178179
$entityTypes = ['catalog_product', 'catalog_category', 'customer'];
179180
$attributeTypes = ['AnyType'];
180-
$attributeMetaData = array_map(null,$response['customAttributeMetadata']['items'], $entityTypes );
181-
foreach($attributeMetaData as $itemsIndex =>$itemArray)
182-
{
183-
$this->assertResponseFields(
184-
$attributeMetaData[$itemsIndex][0],
185-
[
181+
$attributeMetaData = array_map(null, $response['customAttributeMetadata']['items'], $entityTypes);
182+
foreach ($attributeMetaData as $itemsIndex => $itemArray) {
183+
$this->assertResponseFields(
184+
$attributeMetaData[$itemsIndex][0],
185+
[
186186
"attribute_code" => $expectedAttributeCodes[$itemsIndex],
187187
"attribute_type" =>$attributeTypes[0],
188188
"entity_type" => $entityTypes[$itemsIndex]
189-
]
190-
);
189+
]
190+
);
191191
}
192192
}
193193

0 commit comments

Comments
 (0)