summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src
diff options
context:
space:
mode:
authorxjm2017-09-15 21:52:14 (GMT)
committerxjm2017-09-15 21:52:14 (GMT)
commit44a5c4cbe08a0e80209dc6c5ac688a247e36ca11 (patch)
tree26106647bb5dac7f2d89186353d4b4086c9e6823 /core/modules/node/src
parentcc34cb8055821db244e9a916e7f31cca7ead115f (diff)
Issue #2901739 by andriyun, Jo Fitzgerald, mfernea, xjm: Fix 'Squiz.Arrays.ArrayDeclaration' coding standard
Diffstat (limited to 'core/modules/node/src')
-rw-r--r--core/modules/node/src/NodeViewBuilder.php14
-rw-r--r--core/modules/node/src/Tests/NodeRevisionsTest.php16
2 files changed, 18 insertions, 12 deletions
diff --git a/core/modules/node/src/NodeViewBuilder.php b/core/modules/node/src/NodeViewBuilder.php
index f96302b..f0971fb 100644
--- a/core/modules/node/src/NodeViewBuilder.php
+++ b/core/modules/node/src/NodeViewBuilder.php
@@ -29,12 +29,14 @@ class NodeViewBuilder extends EntityViewBuilder {
if ($display->getComponent('links')) {
$build[$id]['links'] = [
- '#lazy_builder' => [get_called_class() . '::renderLinks', [
- $entity->id(),
- $view_mode,
- $entity->language()->getId(),
- !empty($entity->in_preview),
- ]],
+ '#lazy_builder' => [
+ get_called_class() . '::renderLinks', [
+ $entity->id(),
+ $view_mode,
+ $entity->language()->getId(),
+ !empty($entity->in_preview),
+ ],
+ ],
];
}
diff --git a/core/modules/node/src/Tests/NodeRevisionsTest.php b/core/modules/node/src/Tests/NodeRevisionsTest.php
index 1982266..e9fcece 100644
--- a/core/modules/node/src/Tests/NodeRevisionsTest.php
+++ b/core/modules/node/src/Tests/NodeRevisionsTest.php
@@ -168,9 +168,11 @@ class NodeRevisionsTest extends NodeTestBase {
// Confirm that revisions revert properly.
$this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[1]->getRevisionid() . "/revert", [], t('Revert'));
- $this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.',
- ['@type' => 'Basic page', '%title' => $nodes[1]->label(),
- '%revision-date' => format_date($nodes[1]->getRevisionCreationTime())]), 'Revision reverted.');
+ $this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.', [
+ '@type' => 'Basic page',
+ '%title' => $nodes[1]->label(),
+ '%revision-date' => format_date($nodes[1]->getRevisionCreationTime())
+ ]), 'Revision reverted.');
$node_storage->resetCache([$node->id()]);
$reverted_node = $node_storage->load($node->id());
$this->assertTrue(($nodes[1]->body->value == $reverted_node->body->value), 'Node reverted correctly.');
@@ -191,9 +193,11 @@ class NodeRevisionsTest extends NodeTestBase {
// Confirm revisions delete properly.
$this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[1]->getRevisionId() . "/delete", [], t('Delete'));
- $this->assertRaw(t('Revision from %revision-date of @type %title has been deleted.',
- ['%revision-date' => format_date($nodes[1]->getRevisionCreationTime()),
- '@type' => 'Basic page', '%title' => $nodes[1]->label()]), 'Revision deleted.');
+ $this->assertRaw(t('Revision from %revision-date of @type %title has been deleted.', [
+ '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()),
+ '@type' => 'Basic page',
+ '%title' => $nodes[1]->label(),
+ ]), 'Revision deleted.');
$this->assertTrue(db_query('SELECT COUNT(vid) FROM {node_revision} WHERE nid = :nid and vid = :vid', [':nid' => $node->id(), ':vid' => $nodes[1]->getRevisionId()])->fetchField() == 0, 'Revision not found.');
$this->assertTrue(db_query('SELECT COUNT(vid) FROM {node_field_revision} WHERE nid = :nid and vid = :vid', [':nid' => $node->id(), ':vid' => $nodes[1]->getRevisionId()])->fetchField() == 0, 'Field revision not found.');