summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-10-10 14:43:06 (GMT)
committerNathaniel Catchpole2017-10-10 14:43:06 (GMT)
commitf659d6ca8e667446ce8033ef3ca8b0aed99f95f3 (patch)
treeca331d629f752170be5fa225fde1a94aa0d92b25 /core/lib/Drupal/Core/Render
parent942b70b4dda3cf5c2d4a87ad745d40ace24850d9 (diff)
Issue #2901726 by mfernea, gmario, finn.lewis, robertoperuzzo, rachel_norfolk: Fix 'Squiz.Functions.MultiLineFunctionDeclaration' coding standard
Diffstat (limited to 'core/lib/Drupal/Core/Render')
-rw-r--r--core/lib/Drupal/Core/Render/Element/Checkboxes.php2
-rw-r--r--core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php4
-rw-r--r--core/lib/Drupal/Core/Render/Renderer.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/core/lib/Drupal/Core/Render/Element/Checkboxes.php b/core/lib/Drupal/Core/Render/Element/Checkboxes.php
index 3663cd5..35611fd 100644
--- a/core/lib/Drupal/Core/Render/Element/Checkboxes.php
+++ b/core/lib/Drupal/Core/Render/Element/Checkboxes.php
@@ -139,7 +139,7 @@ class Checkboxes extends FormElement {
//
// @see \Drupal\Core\Render\Element\Checkboxes::valueCallback()
// @see https://www.w3.org/TR/html401/interact/forms.html#checkbox
- $checked = array_filter($input, function($value) {
+ $checked = array_filter($input, function ($value) {
return $value !== 0;
});
return array_keys($checked);
diff --git a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php
index c76a972..5966668 100644
--- a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php
+++ b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php
@@ -139,7 +139,7 @@ class HtmlRenderer implements MainContentRendererInterface {
// RendererInterface::render() instead of RendererInterface::renderRoot().
// @see \Drupal\Core\Render\HtmlResponseAttachmentsProcessor.
$render_context = new RenderContext();
- $this->renderer->executeInRenderContext($render_context, function() use (&$html) {
+ $this->renderer->executeInRenderContext($render_context, function () use (&$html) {
// RendererInterface::render() renders the $html render array and updates
// it in place. We don't care about the return value (which is just
// $html['#markup']), but about the resulting render array.
@@ -216,7 +216,7 @@ class HtmlRenderer implements MainContentRendererInterface {
// ::renderResponse().
// @todo Remove this once https://www.drupal.org/node/2359901 lands.
if (!empty($main_content)) {
- $this->renderer->executeInRenderContext(new RenderContext(), function() use (&$main_content) {
+ $this->renderer->executeInRenderContext(new RenderContext(), function () use (&$main_content) {
if (isset($main_content['#cache']['keys'])) {
// Retain #title, otherwise, dynamically generated titles would be
// missing for controllers whose entire returned render array is
diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php
index 584f79f..5038851 100644
--- a/core/lib/Drupal/Core/Render/Renderer.php
+++ b/core/lib/Drupal/Core/Render/Renderer.php
@@ -309,7 +309,7 @@ class Renderer implements RendererInterface {
if (count($elements['#lazy_builder']) !== 2) {
throw new \DomainException('The #lazy_builder property must have an array as a value, containing two values: the callback, and the arguments for the callback.');
}
- if (count($elements['#lazy_builder'][1]) !== count(array_filter($elements['#lazy_builder'][1], function($v) {
+ if (count($elements['#lazy_builder'][1]) !== count(array_filter($elements['#lazy_builder'][1], function ($v) {
return is_null($v) || is_scalar($v);
}))) {
throw new \DomainException("A #lazy_builder callback's context may only contain scalar values or NULL.");