summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateu Aguiló Bosch2017-09-22 13:28:51 +0200
committerMateu Aguiló Bosch2017-09-22 13:28:51 +0200
commitaf0aa487e6de8139db2ea8d158b5f331118cb654 (patch)
treee407b869617116bfd27ecdeccec1a2e1e9b913f0
parenta5ee7a7fe98b73eeb2c613b7d497c89d956b9950 (diff)
fix(Maintainability): Simplify code for dependency resolution
-rw-r--r--src/Normalizer/JsonBlueprintDenormalizer.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Normalizer/JsonBlueprintDenormalizer.php b/src/Normalizer/JsonBlueprintDenormalizer.php
index 19b4554..1452e37 100644
--- a/src/Normalizer/JsonBlueprintDenormalizer.php
+++ b/src/Normalizer/JsonBlueprintDenormalizer.php
@@ -186,12 +186,11 @@ class JsonBlueprintDenormalizer implements DenormalizerInterface, SerializerAwar
};
while (count($subreqs_with_unresolved_deps)) {
$no_deps = array_filter($subreqs_with_unresolved_deps, $dependency_is_resolved);
- $sequence->stack($no_deps);
- $diff = array_diff($subreqs_with_unresolved_deps, $no_deps);
if (empty($no_deps)) {
throw new BadRequestHttpException('Waiting for unresolvable request. Abort.');
}
- $subreqs_with_unresolved_deps = $diff;
+ $sequence->stack($no_deps);
+ $subreqs_with_unresolved_deps = array_diff($subreqs_with_unresolved_deps, $no_deps);
}
return $sequence;
}