@@ -149,7 +149,7 @@ public function resolve($value, $args, ResolveContext $context, ResolveInfo $inf
149149 $ plugin = $ this ->prepare ($ value , $ args , $ context , $ info , $ field );
150150
151151 return DeferredUtility::returnFinally ($ plugin , function (DataProducerPluginInterface $ plugin ) use ($ context , $ field ) {
152- foreach ($ plugin ->getContexts () as $ id => $ item ) {
152+ foreach ($ plugin ->getContexts () as $ item ) {
153153 /** @var \Drupal\Core\Plugin\Context\Context $item */
154154 if ($ item ->getContextDefinition ()->isRequired () && !$ item ->hasContextValue ()) {
155155 return NULL ;
@@ -198,7 +198,7 @@ protected function prepare($value, $args, ResolveContext $context, ResolveInfo $
198198 }
199199
200200 $ values = DeferredUtility::waitAll ($ values );
201- return DeferredUtility::returnFinally ($ values , function ($ values ) use ($ contexts , $ plugin ) {
201+ return DeferredUtility::returnFinally ($ values , function ($ values ) use ($ plugin ) {
202202 foreach ($ values as $ name => $ value ) {
203203 $ plugin ->setContextValue ($ name , $ value );
204204 }
@@ -216,7 +216,7 @@ protected function prepare($value, $args, ResolveContext $context, ResolveInfo $
216216 */
217217 protected function resolveUncached (DataProducerPluginInterface $ plugin , ResolveContext $ context , FieldContext $ field ) {
218218 $ output = $ plugin ->resolveField ($ field );
219- return DeferredUtility::applyFinally ($ output , function () use ($ context , $ plugin , $ field ) {
219+ return DeferredUtility::applyFinally ($ output , function () use ($ plugin , $ field ) {
220220 $ field ->addCacheableDependency ($ plugin );
221221 });
222222 }
@@ -237,7 +237,7 @@ protected function resolveCached(DataProducerPluginCachingInterface $plugin, Res
237237 }
238238
239239 $ output = $ this ->resolveUncached ($ plugin , $ context , $ field );
240- return DeferredUtility::applyFinally ($ output , function ($ value ) use ($ context , $ field , $ prefix ) {
240+ return DeferredUtility::applyFinally ($ output , function ($ value ) use ($ field , $ prefix ) {
241241 $ this ->cacheWrite ($ prefix , $ value , $ field );
242242 });
243243 }
0 commit comments