File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
lib/internal/Magento/Framework/GraphQl/Query Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ class Fields
31
31
public function setQuery ($ query , array $ variables = null )
32
32
{
33
33
$ queryFields = [];
34
+ // phpcs:ignore Generic.CodeAnalysis.EmptyStatement
34
35
try {
35
36
$ queryAst = \GraphQL \Language \Parser::parse (new \GraphQL \Language \Source ($ query ?: '' , 'GraphQL ' ));
36
37
\GraphQL \Language \Visitor::visit (
@@ -75,12 +76,14 @@ public function getFieldsUsedInQuery()
75
76
* @param array $variables
76
77
*
77
78
* @return string[]
79
+ *
78
80
*/
79
81
private function extractVariables (array $ variables ): array
80
82
{
81
83
$ fields = [];
82
84
foreach ($ variables as $ key => $ value ) {
83
85
if (is_array ($ value )) {
86
+ // phpcs:ignore Magento2.Performance.ForeachArrayMerge
84
87
$ fields = array_merge ($ fields , $ this ->extractVariables ($ value ));
85
88
}
86
89
$ fields [$ key ] = $ key ;
You can’t perform that action at this time.
0 commit comments