Skip to content

Commit 5f392cb

Browse files
committed
CS fixes.
1 parent f3f97a5 commit 5f392cb

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

pager_example/src/Controller/PagerExamplePage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function getContent() {
6363
// First we'll tell the user what's going on. This content can be found
6464
// in the twig template file: templates/description.html.twig.
6565
// @todo: Set up links to create nodes and point to devel module.
66-
// https://www.drupal.org/project/examples/issues/2986434
66+
// https://www.drupal.org/project/examples/issues/2986434
6767
$build = [
6868
'description' => [
6969
'#theme' => 'pager_example_description',

render_example/src/Controller/RenderExampleController.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,8 @@ public function arrays() {
293293
// in addition to functions. See
294294
// \Drupal\render_example\Controller\RenderExampleController::preRender()
295295
// @todo: This doesn't work, we need to fix it.
296-
// https://www.drupal.org/project/examples/issues/2986435
297-
// $build['#pre_render'] = [static::class, 'preRender'];
298-
296+
// https://www.drupal.org/project/examples/issues/2986435
297+
// $build['#pre_render'] = [static::class, 'preRender'];.
299298
// Caching is an important part of the Render API, converting an array to a
300299
// string of HTML can be an expensive process, and therefore whenever
301300
// possible the Render API will cache the results of rendering an array in
@@ -387,7 +386,7 @@ public function arrays() {
387386
],
388387
];
389388

390-
$output = array();
389+
$output = [];
391390
// We are going to create a new output render array that pairs each
392391
// example with a set of helper render arrays. These are used to display
393392
// the description as a title and the unrendered content alongside the
@@ -403,7 +402,7 @@ public function arrays() {
403402
'rendered' => $build[$key],
404403
'unrendered' => [
405404
'#type' => 'markup',
406-
'#markup' => htmlentities(\Drupal\Component\Utility\Variable::export($build[$key])),
405+
'#markup' => htmlentities(Variable::export($build[$key])),
407406
],
408407
];
409408
}
@@ -454,8 +453,8 @@ public static function preRender(array $element) {
454453
// recursive so this will still be located, and rendered to HTML.
455454
'rendered' => $child,
456455
// Export the element definition as a string of text so we can display
457-
// the array that was used to create the rendered output just below the
458-
// output.
456+
// the array that was used to create the rendered output just below
457+
// the output.
459458
'unrendered' => [
460459
'#markup' => htmlentities(Variable::export($child)),
461460
],

render_example/tests/src/Functional/RenderExampleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function testRenderExample() {
113113
// @todo: Add more of these.
114114
'foof' => 'Hello ' . $web_user->getAccountName() . ', welcome to the #cache example.',
115115
];
116-
foreach($xpath_array as $key => $value) {
116+
foreach ($xpath_array as $key => $value) {
117117
$session->pageTextContains($value);
118118
}
119119
}

0 commit comments

Comments
 (0)