Skip to content

Commit 5aea62c

Browse files
committed
MC-21524: Schema introspection return incomplete results
- fixed sattic failures
1 parent dd4b0d3 commit 5aea62c

File tree

1 file changed

+3
-0
lines changed
  • lib/internal/Magento/Framework/GraphQl/Query

1 file changed

+3
-0
lines changed

lib/internal/Magento/Framework/GraphQl/Query/Fields.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class Fields
3131
public function setQuery($query, array $variables = null)
3232
{
3333
$queryFields = [];
34+
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement
3435
try {
3536
$queryAst = \GraphQL\Language\Parser::parse(new \GraphQL\Language\Source($query ?: '', 'GraphQL'));
3637
\GraphQL\Language\Visitor::visit(
@@ -75,12 +76,14 @@ public function getFieldsUsedInQuery()
7576
* @param array $variables
7677
*
7778
* @return string[]
79+
*
7880
*/
7981
private function extractVariables(array $variables): array
8082
{
8183
$fields = [];
8284
foreach ($variables as $key => $value) {
8385
if (is_array($value)) {
86+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
8487
$fields = array_merge($fields, $this->extractVariables($value));
8588
}
8689
$fields[$key] = $key;

0 commit comments

Comments
 (0)