Unverified Commit 6c40e077 authored by alexpott's avatar alexpott
Browse files

Issue #2937853 by idebr, mfernea, SherFengChong, alexpott, borisson_: Fix...

Issue #2937853 by idebr, mfernea, SherFengChong, alexpott, borisson_: Fix 'Drupal.Formatting.MultipleStatementAlignment' coding standard
parent 500403b4
......@@ -1371,9 +1371,9 @@ function template_preprocess_page(&$variables) {
}
}
$variables['base_path'] = base_path();
$variables['front_page'] = \Drupal::url('<front>');
$variables['language'] = $language_interface;
$variables['base_path'] = base_path();
$variables['front_page'] = \Drupal::url('<front>');
$variables['language'] = $language_interface;
// An exception might be thrown.
try {
......
......@@ -41,7 +41,7 @@ class DateTimePlus {
use ToStringTrait;
const FORMAT = 'Y-m-d H:i:s';
const FORMAT = 'Y-m-d H:i:s';
/**
* A RFC7231 Compliant date.
......
......@@ -189,7 +189,7 @@ protected function processCss($contents, $optimize = FALSE) {
if ($optimize) {
// Perform some safe CSS optimizations.
// Regexp to match comment blocks.
$comment = '/\*[^*]*\*+(?:[^/*][^*]*\*+)*/';
$comment = '/\*[^*]*\*+(?:[^/*][^*]*\*+)*/';
// Regexp to match double quoted strings.
$double_quot = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"';
// Regexp to match single quoted strings.
......
......@@ -74,7 +74,7 @@ protected function getMaxRowsForBin($bin) {
$max_rows_settings = $this->settings->get('database_cache_max_rows');
// First, look for a cache bin specific setting.
if (isset($max_rows_settings['bins'][$bin])) {
$max_rows = $max_rows_settings['bins'][$bin];
$max_rows = $max_rows_settings['bins'][$bin];
}
// Second, use configured default backend.
elseif (isset($max_rows_settings['default'])) {
......
......@@ -145,7 +145,7 @@ protected function getTableSchema(Connection $connection, $table) {
$name = $row['Field'];
// Parse out the field type and meta information.
preg_match('@([a-z]+)(?:\((\d+)(?:,(\d+))?\))?\s*(unsigned)?@', $row['Type'], $matches);
$type = $this->fieldTypeMap($connection, $matches[1]);
$type = $this->fieldTypeMap($connection, $matches[1]);
if ($row['Extra'] === 'auto_increment') {
// If this is an auto increment, then the type is 'serial'.
$type = 'serial';
......
......@@ -70,8 +70,8 @@ public function getInfo() {
*/
public static function valueCallback(&$element, $input, FormStateInterface $form_state) {
if ($input !== FALSE) {
$date_input = $element['#date_date_element'] != 'none' && !empty($input['date']) ? $input['date'] : '';
$time_input = $element['#date_time_element'] != 'none' && !empty($input['time']) ? $input['time'] : '';
$date_input = $element['#date_date_element'] != 'none' && !empty($input['date']) ? $input['date'] : '';
$time_input = $element['#date_time_element'] != 'none' && !empty($input['time']) ? $input['time'] : '';
$date_format = $element['#date_date_element'] != 'none' ? static::getHtml5DateFormat($element) : '';
$time_format = $element['#date_time_element'] != 'none' ? static::getHtml5TimeFormat($element) : '';
$timezone = !empty($element['#date_timezone']) ? $element['#date_timezone'] : NULL;
......
......@@ -401,7 +401,7 @@ public function getAllRoutes() {
* {@inheritdoc}
*/
public function reset() {
$this->routes = [];
$this->routes = [];
$this->serializedRoutes = [];
$this->cacheTagInvalidator->invalidateTags(['routes']);
}
......
......@@ -28,7 +28,7 @@ public function testEmptyActionList() {
// Ensure the empty text appears on the action list page.
/** @var $storage \Drupal\Core\Entity\EntityStorageInterface */
$storage = $this->container->get('entity.manager')->getStorage('action');
$actions = $storage->loadMultiple();
$actions = $storage->loadMultiple();
$storage->delete($actions);
$this->drupalGet('/admin/config/system/actions');
$this->assertRaw('There are no actions yet.');
......
......@@ -179,7 +179,7 @@ function comment_tokens($type, $tokens, array $data, array $options, BubbleableM
// Comment related URLs.
case 'url':
$url_options['fragment'] = 'comment-' . $comment->id();
$url_options['fragment'] = 'comment-' . $comment->id();
$replacements[$original] = $comment->url('canonical', $url_options);
break;
......
......@@ -235,7 +235,7 @@ public function getViewsData() {
// Define the base group of this table. Fields that don't have a group defined
// will go into this field by default.
$data['comment_entity_statistics']['table']['group'] = $this->t('Comment Statistics');
$data['comment_entity_statistics']['table']['group'] = $this->t('Comment Statistics');
// Provide a relationship for each entity type except comment.
foreach ($entities_types as $type => $entity_type) {
......
......@@ -413,7 +413,7 @@ public function topLogMessages($type) {
}
}
$build['dblog_top_table'] = [
$build['dblog_top_table'] = [
'#type' => 'table',
'#header' => $header,
'#rows' => $rows,
......
......@@ -65,7 +65,7 @@ public function getViewsData() {
$data['file_managed']['uid']['relationship']['title'] = $this->t('User who uploaded');
$data['file_managed']['uid']['relationship']['label'] = $this->t('User who uploaded');
$data['file_usage']['table']['group'] = $this->t('File Usage');
$data['file_usage']['table']['group'] = $this->t('File Usage');
// Provide field-type-things to several base tables; on the core files table
// ("file_managed") so that we can create relationships from files to
......
......@@ -62,7 +62,7 @@ protected function doPrivateFileTransferTest() {
$file->setPermanent();
$file->save();
$url = file_create_url($file->getFileUri());
$url = file_create_url($file->getFileUri());
// Set file_test access header to allow the download.
file_test_set_return('download', ['x-foo' => 'Bar']);
......
......@@ -77,7 +77,7 @@ public function save(array $form, FormStateInterface $form_state) {
$status = $term_storage->save($term);
$route_name = $this->urlStub == 'container' ? 'entity.taxonomy_term.forum_edit_container_form' : 'entity.taxonomy_term.forum_edit_form';
$route_parameters = ['taxonomy_term' => $term->id()];
$route_parameters = ['taxonomy_term' => $term->id()];
$link = $this->l($this->t('Edit'), new Url($route_name, $route_parameters));
$view_link = $term->link($term->getName());
switch ($status) {
......
......@@ -27,7 +27,7 @@
function history_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.history':
$output = '<h3>' . t('About') . '</h3>';
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The History module keeps track of which content a user has read. It marks content as <em>new</em> or <em>updated</em> depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered <em>read</em>. The History module does not have a user interface but it provides a filter to <a href=":views-help">Views</a> to show new or updated content. For more information, see the <a href=":url">online documentation for the History module</a>.', [':views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', ['name' => 'views']) : '#', ':url' => 'https://www.drupal.org/documentation/modules/history']) . '</p>';
return $output;
}
......
......@@ -14,7 +14,7 @@ function history_views_data() {
// We're actually defining a specific instance of the table, so let's
// alias it so that we can later add the real table for other purposes if we
// need it.
$data['history']['table']['group'] = t('Content');
$data['history']['table']['group'] = t('Content');
// Explain how this table joins to others.
$data['history']['table']['join'] = [
......
......@@ -161,7 +161,7 @@ function locale_translation_default_translation_server() {
// An additional check is required here. During the upgrade process
// \Drupal::config()->get() returns NULL. We use the defined value as
// fallback.
$pattern = $pattern ? $pattern : LOCALE_TRANSLATION_DEFAULT_SERVER_PATTERN;
$pattern = $pattern ? $pattern : LOCALE_TRANSLATION_DEFAULT_SERVER_PATTERN;
return [
'pattern' => $pattern,
......
......@@ -662,7 +662,7 @@ public function checkInvalidParentMenuLinks() {
$this->drupalPostForm("admin/structure/menu/manage/{$this->menu->id()}/add", $edit, t('Save'));
$menu_links = entity_load_multiple_by_properties('menu_link_content', ['title' => $title]);
$last_link = reset($menu_links);
$created_links[] = 'tools:' . $last_link->getPluginId();
$created_links[] = 'tools:' . $last_link->getPluginId();
}
// The last link cannot be a parent in the new menu link form.
......
......@@ -83,7 +83,7 @@ protected function getDiscovery() {
// This gets rid of migrations which try to use a non-existent source
// plugin. The common case for this is if the source plugin has, or
// specifies, a non-existent provider.
$only_with_source_discovery = new NoSourcePluginDecorator($yaml_discovery);
$only_with_source_discovery = new NoSourcePluginDecorator($yaml_discovery);
// This gets rid of migrations with explicit providers set if one of the
// providers do not exist before we try to use a potentially non-existing
// deriver. This is a rare case.
......
......@@ -124,7 +124,7 @@ public function form(array $form, FormStateInterface $form_state) {
DRUPAL_REQUIRED => t('Required'),
],
];
$form['submission']['help'] = [
$form['submission']['help'] = [
'#type' => 'textarea',
'#title' => t('Explanation or submission guidelines'),
'#default_value' => $type->getHelp(),
......
Supports Markdown
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