mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 04:46:04 +03:00
Fix switch...continue for php 7.3
This commit is contained in:
parent
f438a726cd
commit
a6cc13314d
@ -529,7 +529,7 @@ class Executor
|
|||||||
switch ($selection->kind) {
|
switch ($selection->kind) {
|
||||||
case NodeKind::FIELD:
|
case NodeKind::FIELD:
|
||||||
if (!$this->shouldIncludeNode($selection)) {
|
if (!$this->shouldIncludeNode($selection)) {
|
||||||
continue;
|
continue 2;
|
||||||
}
|
}
|
||||||
$name = self::getFieldEntryKey($selection);
|
$name = self::getFieldEntryKey($selection);
|
||||||
if (!isset($fields[$name])) {
|
if (!isset($fields[$name])) {
|
||||||
@ -541,7 +541,7 @@ class Executor
|
|||||||
if (!$this->shouldIncludeNode($selection) ||
|
if (!$this->shouldIncludeNode($selection) ||
|
||||||
!$this->doesFragmentConditionMatch($selection, $runtimeType)
|
!$this->doesFragmentConditionMatch($selection, $runtimeType)
|
||||||
) {
|
) {
|
||||||
continue;
|
continue 2;
|
||||||
}
|
}
|
||||||
$this->collectFields(
|
$this->collectFields(
|
||||||
$runtimeType,
|
$runtimeType,
|
||||||
@ -553,14 +553,14 @@ class Executor
|
|||||||
case NodeKind::FRAGMENT_SPREAD:
|
case NodeKind::FRAGMENT_SPREAD:
|
||||||
$fragName = $selection->name->value;
|
$fragName = $selection->name->value;
|
||||||
if (!empty($visitedFragmentNames[$fragName]) || !$this->shouldIncludeNode($selection)) {
|
if (!empty($visitedFragmentNames[$fragName]) || !$this->shouldIncludeNode($selection)) {
|
||||||
continue;
|
continue 2;
|
||||||
}
|
}
|
||||||
$visitedFragmentNames[$fragName] = true;
|
$visitedFragmentNames[$fragName] = true;
|
||||||
|
|
||||||
/** @var FragmentDefinitionNode|null $fragment */
|
/** @var FragmentDefinitionNode|null $fragment */
|
||||||
$fragment = isset($exeContext->fragments[$fragName]) ? $exeContext->fragments[$fragName] : null;
|
$fragment = isset($exeContext->fragments[$fragName]) ? $exeContext->fragments[$fragName] : null;
|
||||||
if (!$fragment || !$this->doesFragmentConditionMatch($fragment, $runtimeType)) {
|
if (!$fragment || !$this->doesFragmentConditionMatch($fragment, $runtimeType)) {
|
||||||
continue;
|
continue 2;
|
||||||
}
|
}
|
||||||
$this->collectFields(
|
$this->collectFields(
|
||||||
$runtimeType,
|
$runtimeType,
|
||||||
|
@ -352,12 +352,12 @@ class OverlappingFieldsCanBeMerged extends AbstractValidationRule
|
|||||||
/** @var FragmentSpreadNode $selection */
|
/** @var FragmentSpreadNode $selection */
|
||||||
$fragName = $selection->name->value;
|
$fragName = $selection->name->value;
|
||||||
if (!empty($_visitedFragmentNames[$fragName])) {
|
if (!empty($_visitedFragmentNames[$fragName])) {
|
||||||
continue;
|
continue 2;
|
||||||
}
|
}
|
||||||
$_visitedFragmentNames[$fragName] = true;
|
$_visitedFragmentNames[$fragName] = true;
|
||||||
$fragment = $context->getFragment($fragName);
|
$fragment = $context->getFragment($fragName);
|
||||||
if (!$fragment) {
|
if (!$fragment) {
|
||||||
continue;
|
continue 2;
|
||||||
}
|
}
|
||||||
$fragmentType = TypeInfo::typeFromAST($context->getSchema(), $fragment->typeCondition);
|
$fragmentType = TypeInfo::typeFromAST($context->getSchema(), $fragment->typeCondition);
|
||||||
$_astAndDefs = $this->collectFieldNodesAndDefs(
|
$_astAndDefs = $this->collectFieldNodesAndDefs(
|
||||||
|
Loading…
Reference in New Issue
Block a user