Commit 6dc062eb authored by xjm's avatar xjm
Browse files

Issue #2901562 by mfernea, Jo Fitzgerald, Yogesh Pawar, 3ssom, Mile23,...

Issue #2901562 by mfernea, Jo Fitzgerald, Yogesh Pawar, 3ssom, Mile23, borisson_: Fix 'Squiz.WhiteSpace.SuperfluousWhitespace' coding standard
parent edf57d8a
......@@ -1117,7 +1117,6 @@ function drupal_flush_all_caches() {
// to reset the theme manager.
\Drupal::theme()->resetActiveTheme();
// Rebuild and reboot a new kernel. A simple DrupalKernel reboot is not
// sufficient, since the list of enabled modules might have been adjusted
// above due to changed code.
......
......@@ -526,7 +526,6 @@ function file_unmanaged_prepare($source, &$destination = NULL, $replace = FILE_E
$destination = file_build_uri(drupal_basename($source));
}
// Prepare the destination directory.
if (file_prepare_directory($destination)) {
// The destination is already a directory, so append the source basename.
......
......@@ -148,7 +148,6 @@ public function check($from_lines, $to_lines) {
trigger_error("Reversed closing doesn't match", E_USER_ERROR);
}
$prevtype = 'none';
foreach ($this->edits as $edit) {
if ( $prevtype == $edit->type ) {
......
......@@ -36,7 +36,6 @@ public function process(ContainerBuilder $container) {
}
}
$container->setParameter('cache_contexts', $cache_contexts);
}
......
......@@ -124,7 +124,6 @@ public static function open(array &$connection_options = []) {
throw $e;
}
// Create functions needed by SQLite.
$pdo->sqliteCreateFunction('if', [__CLASS__, 'sqlFunctionIf']);
$pdo->sqliteCreateFunction('greatest', [__CLASS__, 'sqlFunctionGreatest']);
......
......@@ -825,7 +825,6 @@ public function __toString() {
}
$query .= implode(', ', $fields);
// FROM - We presume all queries have a FROM, as any query that doesn't won't need the query builder anyway.
$query .= "\nFROM ";
foreach ($this->tables as $table) {
......
......@@ -56,7 +56,6 @@ public function process(ContainerBuilder $container) {
}
}
foreach ($container->findTaggedServiceIds('backend_overridable') as $id => $attributes) {
// If the service is already an alias it is not the original backend, so
// we don't want to fallback to other storages any longer.
......
......@@ -265,7 +265,6 @@ public function uninstall(array $theme_list) {
$extension_config->save(TRUE);
$this->state->set('system.theme.data', $current_theme_data);
// @todo Remove system_list().
$this->themeHandler->refreshInfo();
$this->resetSystem();
......
......@@ -269,7 +269,6 @@ public static function preRenderAjaxForm($element) {
$element['#attributes']['data-disable-refocus'] = "true";
}
// Add a reasonable default event handler if none was specified.
if (isset($element['#ajax']) && !isset($element['#ajax']['event'])) {
switch ($element['#type']) {
......
......@@ -141,7 +141,6 @@ public function dump(array $options = []) {
$insert->execute();
}
}
catch (\Exception $e) {
$transaction->rollBack();
......
......@@ -446,7 +446,6 @@ protected function sendNoJsPlaceholders($html, $no_js_placeholders, AttachedAsse
}
}
// Create a new HtmlResponse. Ensure the CSS and (non-bottom) JS is sent
// before the HTML they're associated with. In other words: ensure the
// critical assets for this placeholder's markup are loaded first.
......@@ -483,7 +482,6 @@ protected function sendNoJsPlaceholders($html, $no_js_placeholders, AttachedAsse
}
}
// Send this embedded HTML response.
$this->sendChunk($html_response);
......
......@@ -45,7 +45,6 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
'contexts' => ['session.exists', 'cookies:big_pipe_nojs'],
];
// 1. Real-world example of HTML placeholder.
$status_messages = new BigPipePlaceholderTestCase(
['#type' => 'status_messages'],
......@@ -96,7 +95,6 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
$status_messages->embeddedHtmlResponse = '<div role="contentinfo" aria-label="Status message" class="messages messages--status">' . "\n" . ' <h2 class="visually-hidden">Status message</h2>' . "\n" . ' Hello from BigPipe!' . "\n" . ' </div>' . "\n \n";
}
// 2. Real-world example of HTML attribute value placeholder: form action.
$form_action = new BigPipePlaceholderTestCase(
$container ? $container->get('form_builder')->getForm('Drupal\big_pipe_test\Form\BigPipeTestForm') : [],
......@@ -119,7 +117,6 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
$form_action->embeddedHtmlResponse = '<form class="big-pipe-test-form" data-drupal-selector="big-pipe-test-form" action="' . base_path() . 'big_pipe_test"';
}
// 3. Real-world example of HTML attribute value subset placeholder: CSRF
// token in link.
$csrf_token = new BigPipePlaceholderTestCase(
......@@ -150,7 +147,6 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
$csrf_token->embeddedHtmlResponse = $container->get('csrf_token')->get('admin/appearance/default');
}
// 4. Edge case: custom string to be considered as a placeholder that
// happens to not be valid HTML.
$hello = new BigPipePlaceholderTestCase(
......@@ -182,7 +178,6 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
];
$hello->embeddedHtmlResponse = '<marquee>Yarhar llamas forever!</marquee>';
// 5. Edge case: non-#lazy_builder placeholder.
$current_time = new BigPipePlaceholderTestCase(
[
......@@ -239,7 +234,6 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
];
$current_time->embeddedHtmlResponse = '<time datetime="1991-03-14"></time>';
// 6. Edge case: #lazy_builder that throws an exception.
$exception = new BigPipePlaceholderTestCase(
[
......
......@@ -54,7 +54,6 @@ public function testCommentThreading() {
// Confirm that there is a link to the parent comment.
$this->assertParentLink($comment1_3->id(), $comment1->id());
// Reply to comment #1_3 creating comment #1_3_4.
$this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment/' . $comment1_3->id());
$comment1_3_4 = $this->postComment(NULL, $this->randomMachineName(), $this->randomMachineName(), TRUE);
......
......@@ -97,7 +97,6 @@ protected function opBetween($field) {
// Formatting will vary on date storage.
// Convert to ISO format and format for query. UTC timezone is used since
// dates are stored in UTC.
$a = $this->query->getDateFormat("'" . $this->dateFormatter->format($a, 'custom', DateTimeItemInterface::DATETIME_STORAGE_FORMAT, DateTimeItemInterface::STORAGE_TIMEZONE) . "'", $this->dateFormat, TRUE);
......
......@@ -158,7 +158,6 @@ protected function setUp() {
]);
$editor->save();
// Create node type.
$this->drupalCreateContentType([
'type' => 'article',
......
......@@ -46,7 +46,6 @@ public function testEditorUpdate8001() {
$this->assertTrue($editor_full_html->get('status'));
$this->assertNotIdentical($format_full_html->get('status'), $editor_full_html->get('status'));
// Run updates.
$this->runUpdates();
......
......@@ -77,7 +77,6 @@ protected function setUp() {
],
])->save();
// Create a file field.
$file_field_name = 'file_field';
$field_storage = FieldStorageConfig::create([
......
......@@ -128,7 +128,6 @@ public function testFieldInstances() {
$this->assertEntity('comment.comment_node_test_content_type.field_integer', 'Integer', 'integer', FALSE, FALSE);
$this->assertEntity('user.user.field_file', 'File', 'file', FALSE, FALSE);
$this->assertLinkFields('node.test_content_type.field_link', DRUPAL_OPTIONAL);
$this->assertLinkFields('node.article.field_link', DRUPAL_DISABLED);
$this->assertLinkFields('node.blog.field_link', DRUPAL_REQUIRED);
......
......@@ -86,7 +86,6 @@ function forum_views_data() {
],
];
$data['forum_index']['created'] = [
'title' => t('Post date'),
'help' => t('The date the content was posted.'),
......
......@@ -52,7 +52,6 @@ public function testNewForumTopicsBlock() {
// Create 5 forum topics.
$topics = $this->createForumTopics();
$this->assertLink(t('More'), 0, 'New forum topics block has a "more"-link.');
$this->assertLinkByHref('forum', 0, 'New forum topics block has a "more"-link.');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment