@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | protected function getDisplayModes() { |
64 | 64 | $storage = $this->entityTypeManager->getStorage('entity_view_mode'); |
65 | - return array_reduce($storage->loadMultiple(), function ($carry, EntityViewModeInterface $current) { |
|
65 | + return array_reduce($storage->loadMultiple(), function($carry, EntityViewModeInterface $current) { |
|
66 | 66 | $target = $current->getTargetType(); |
67 | 67 | list(, $id) = explode('.', $current->id()); |
68 | 68 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | // EarlyRenderingControllerWrapperSubscriber throws the leaked cache |
77 | 77 | // metadata exception. To avoid this, wrap the execution in its own render |
78 | 78 | // context. |
79 | - return $this->renderer->executeInRenderContext(new RenderContext(), function () use ($value, $args, $context, $info) { |
|
79 | + return $this->renderer->executeInRenderContext(new RenderContext(), function() use ($value, $args, $context, $info) { |
|
80 | 80 | $entityTypeId = $this->pluginDefinition['entity_type']; |
81 | 81 | |
82 | 82 | // The raw input needs to be converted to use the proper field and property |
@@ -75,7 +75,7 @@ |
||
75 | 75 | // EarlyRenderingControllerWrapperSubscriber throws the leaked cache |
76 | 76 | // metadata exception. To avoid this, wrap the execution in its own render |
77 | 77 | // context. |
78 | - return $this->renderer->executeInRenderContext(new RenderContext(), function () use ($value, $args, $context, $info) { |
|
78 | + return $this->renderer->executeInRenderContext(new RenderContext(), function() use ($value, $args, $context, $info) { |
|
79 | 79 | $entityTypeId = $this->pluginDefinition['entity_type']; |
80 | 80 | $storage = $this->entityTypeManager->getStorage($entityTypeId); |
81 | 81 |
@@ -74,7 +74,7 @@ |
||
74 | 74 | // EarlyRenderingControllerWrapperSubscriber throws the leaked cache |
75 | 75 | // metadata exception. To avoid this, wrap the execution in its own render |
76 | 76 | // context. |
77 | - return $this->renderer->executeInRenderContext(new RenderContext(), function () use ($value, $args, $context, $info) { |
|
77 | + return $this->renderer->executeInRenderContext(new RenderContext(), function() use ($value, $args, $context, $info) { |
|
78 | 78 | $entityTypeId = $this->pluginDefinition['entity_type']; |
79 | 79 | $bundleName = $this->pluginDefinition['entity_bundle']; |
80 | 80 | $storage = $this->entityTypeManager->getStorage($entityTypeId); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * {@inheritdoc} |
25 | 25 | */ |
26 | 26 | public function resolveValues($value, array $args, ResolveContext $context, ResolveInfo $info) { |
27 | - if ($value instanceof ConstraintViolationInterface){ |
|
27 | + if ($value instanceof ConstraintViolationInterface) { |
|
28 | 28 | yield $value->getMessage(); |
29 | 29 | } |
30 | 30 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | // Add the target field condition to the query. |
65 | 65 | $definition = $this->getPluginDefinition(); |
66 | 66 | $field = $definition['field']; |
67 | - $ids = array_map(function ($item) { |
|
67 | + $ids = array_map(function($item) { |
|
68 | 68 | return $item['target_id']; |
69 | 69 | }, $value->get($field)->getValue()); |
70 | 70 |
@@ -72,7 +72,7 @@ |
||
72 | 72 | ['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'], |
73 | 73 | ]; |
74 | 74 | |
75 | - foreach (array_filter($this->menuLinkTree->transform($tree, $manipulators), function (MenuLinkTreeElement $item) { |
|
75 | + foreach (array_filter($this->menuLinkTree->transform($tree, $manipulators), function(MenuLinkTreeElement $item) { |
|
76 | 76 | return $item->link instanceof MenuLinkInterface && $item->link->isEnabled() && (empty($item->access) || $item->access->isAllowed()); |
77 | 77 | }) as $branch) { |
78 | 78 | yield $branch; |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | 'region' => $args['region'], |
129 | 129 | ]); |
130 | 130 | |
131 | - $resolve = $this->subRequestBuffer->add($value, function () use ($blocks) { |
|
132 | - $blocks = array_filter($blocks, function (Block $block) { |
|
131 | + $resolve = $this->subRequestBuffer->add($value, function() use ($blocks) { |
|
132 | + $blocks = array_filter($blocks, function(Block $block) { |
|
133 | 133 | return array_reduce(iterator_to_array($block->getVisibilityConditions()), function($value, ConditionInterface $condition) { |
134 | 134 | return $value && (!$condition->isNegated() == $condition->evaluate()); |
135 | 135 | }, TRUE); |
@@ -140,10 +140,10 @@ discard block |
||
140 | 140 | return $blocks; |
141 | 141 | }); |
142 | 142 | |
143 | - return function ($value, array $args, ResolveContext $context, ResolveInfo $info) use ($resolve) { |
|
143 | + return function($value, array $args, ResolveContext $context, ResolveInfo $info) use ($resolve) { |
|
144 | 144 | /** @var \Drupal\graphql\GraphQL\Cache\CacheableValue $response */ |
145 | 145 | $response = $resolve(); |
146 | - $blocks = array_map(function (Block $block) { |
|
146 | + $blocks = array_map(function(Block $block) { |
|
147 | 147 | $plugin = $block->getPlugin(); |
148 | 148 | if ($plugin instanceof BlockContentBlock) { |
149 | 149 | return $this->entityRepository->loadEntityByUuid('block_content', $plugin->getDerivativeId()); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | protected function resolveValues($value, array $args, ResolveContext $context, ResolveInfo $info) { |
98 | 98 | if ($value instanceof Url) { |
99 | - $resolve = $this->subRequestBuffer->add($value, function () { |
|
99 | + $resolve = $this->subRequestBuffer->add($value, function() { |
|
100 | 100 | $request = $this->requestStack->getCurrentRequest()->duplicate(); |
101 | 101 | $request->attributes->set('_controller', $request->get('_graphql_controller')); |
102 | 102 | $request->attributes->remove('_graphql_subrequest'); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | return $response; |
115 | 115 | }); |
116 | 116 | |
117 | - return function ($value, array $args, ResolveContext $context, ResolveInfo $info) use ($resolve) { |
|
117 | + return function($value, array $args, ResolveContext $context, ResolveInfo $info) use ($resolve) { |
|
118 | 118 | /** @var \Drupal\graphql\GraphQL\Cache\CacheableValue $response */ |
119 | 119 | $response = $resolve(); |
120 | 120 | yield new CacheableValue($response->getValue(), [$response]); |