We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 120-129 (lines=10) @@ | ||
| 117 | ); |
|
| 118 | } |
|
| 119 | ||
| 120 | private function fieldComplexity($node, $complexity = 0) |
|
| 121 | { |
|
| 122 | if (isset($node->selectionSet) && $node->selectionSet instanceof SelectionSet) { |
|
| 123 | foreach ($node->selectionSet->selections as $childNode) { |
|
| 124 | $complexity = $this->nodeComplexity($childNode, $complexity); |
|
| 125 | } |
|
| 126 | } |
|
| 127 | ||
| 128 | return $complexity; |
|
| 129 | } |
|
| 130 | ||
| 131 | private function nodeComplexity(Node $node, $complexity = 0) |
|
| 132 | { |
|
| @@ 82-91 (lines=10) @@ | ||
| 79 | return $this->getMaxQueryDepth() !== static::DISABLED; |
|
| 80 | } |
|
| 81 | ||
| 82 | private function fieldDepth($node, $depth = 0, $maxDepth = 0) |
|
| 83 | { |
|
| 84 | if (isset($node->selectionSet) && $node->selectionSet instanceof SelectionSet) { |
|
| 85 | foreach ($node->selectionSet->selections as $childNode) { |
|
| 86 | $maxDepth = $this->nodeDepth($childNode, $depth, $maxDepth); |
|
| 87 | } |
|
| 88 | } |
|
| 89 | ||
| 90 | return $maxDepth; |
|
| 91 | } |
|
| 92 | ||
| 93 | private function nodeDepth(Node $node, $depth = 0, $maxDepth = 0) |
|
| 94 | { |
|