We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -70,14 +70,14 @@ |
||
70 | 70 | 'fields' => [ |
71 | 71 | 'firstName' => ['type' => Type::nonNull(Type::string())], |
72 | 72 | 'dogs' => [ |
73 | - 'type' => function () { |
|
73 | + 'type' => function() { |
|
74 | 74 | return Type::nonNull( |
75 | 75 | Type::listOf( |
76 | 76 | Type::nonNull(self::buildDogType()) |
77 | 77 | ) |
78 | 78 | ); |
79 | 79 | }, |
80 | - 'complexity' => function ($childrenComplexity, $args) { |
|
80 | + 'complexity' => function($childrenComplexity, $args) { |
|
81 | 81 | $complexity = isset($args['name']) ? 1 : 10; |
82 | 82 | |
83 | 83 | return $childrenComplexity + $complexity; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | [ |
90 | 90 | // Visit FragmentDefinition after visiting FragmentSpread |
91 | 91 | 'visitSpreadFragments' => true, |
92 | - Node::SELECTION_SET => function (SelectionSet $selectionSet) use ($context) { |
|
92 | + Node::SELECTION_SET => function(SelectionSet $selectionSet) use ($context) { |
|
93 | 93 | $this->fieldAstAndDefs = $this->collectFieldASTsAndDefs( |
94 | 94 | $context, |
95 | 95 | $context->getParentType(), |
@@ -98,13 +98,13 @@ discard block |
||
98 | 98 | $this->fieldAstAndDefs |
99 | 99 | ); |
100 | 100 | }, |
101 | - Node::VARIABLE_DEFINITION => function ($def) { |
|
101 | + Node::VARIABLE_DEFINITION => function($def) { |
|
102 | 102 | $this->variableDefs[] = $def; |
103 | 103 | |
104 | 104 | return Visitor::skipNode(); |
105 | 105 | }, |
106 | 106 | Node::OPERATION_DEFINITION => [ |
107 | - 'leave' => function (OperationDefinition $operationDefinition) use ($context, &$complexity) { |
|
107 | + 'leave' => function(OperationDefinition $operationDefinition) use ($context, &$complexity) { |
|
108 | 108 | $complexity = $this->fieldComplexity($operationDefinition, $complexity); |
109 | 109 | |
110 | 110 | if ($complexity > $this->getMaxQueryComplexity()) { |
@@ -79,6 +79,9 @@ |
||
79 | 79 | return $this->getMaxQueryDepth() !== static::DISABLED; |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param Node $node |
|
84 | + */ |
|
82 | 85 | private function fieldDepth($node, $depth = 0, $maxDepth = 0) |
83 | 86 | { |
84 | 87 | if (isset($node->selectionSet) && $node->selectionSet instanceof SelectionSet) { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $context, |
61 | 61 | [ |
62 | 62 | Node::OPERATION_DEFINITION => [ |
63 | - 'leave' => function (OperationDefinition $operationDefinition) use ($context) { |
|
63 | + 'leave' => function(OperationDefinition $operationDefinition) use ($context) { |
|
64 | 64 | $maxDepth = $this->fieldDepth($operationDefinition); |
65 | 65 | |
66 | 66 | if ($maxDepth > $this->getMaxQueryDepth()) { |
@@ -79,6 +79,9 @@ |
||
79 | 79 | return $this->getMaxQueryDepth() !== static::DISABLED; |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param Node $node |
|
84 | + */ |
|
82 | 85 | private function fieldDepth($node, $depth = 0, $maxDepth = 0) |
83 | 86 | { |
84 | 87 | if (isset($node->selectionSet) && $node->selectionSet instanceof SelectionSet) { |
@@ -127,9 +127,9 @@ |
||
127 | 127 | // from config |
128 | 128 | if (!empty($config['definitions']['mappings']['types'])) { |
129 | 129 | $typesMappings = array_filter(array_map( |
130 | - function (array $typeMapping) use ($container) { |
|
130 | + function(array $typeMapping) use ($container) { |
|
131 | 131 | |
132 | - $params = $this->detectConfigFiles($container, $typeMapping['dir'], $typeMapping['type']); |
|
132 | + $params = $this->detectConfigFiles($container, $typeMapping['dir'], $typeMapping['type']); |
|
133 | 133 | |
134 | 134 | return $params; |
135 | 135 | }, |