diff --git a/core/includes/common.inc b/core/includes/common.inc index de294dfe394c9b35fe2af357ff63ab16bc8924cd..58ede5565c42c780ff7a24c93e7cf3cbbb2c8715 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -715,7 +715,7 @@ function drupal_attach_tabledrag(&$element, array $options) { 'subgroup' => NULL, 'source' => NULL, 'hidden' => TRUE, - 'limit' => 0 + 'limit' => 0, ]; $group = $options['group']; diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 890af7a5635f6c9470c44eee6d47654097993cd0..a8af37aa3aa3a811eee114d0d0fe3430442f41b9 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2050,7 +2050,7 @@ function install_check_requirements($install_state) { 'severity' => REQUIREMENT_ERROR, 'description' => t('The @drupal installer requires that the %default-file file not be modified in any way from the original download.', [ '@drupal' => drupal_install_profile_distribution_name(), - '%default-file' => $default_file + '%default-file' => $default_file, ]), ]; } @@ -2111,7 +2111,7 @@ function install_check_requirements($install_state) { '@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_file, - ':install_txt' => base_path() . 'core/INSTALL.txt' + ':install_txt' => base_path() . 'core/INSTALL.txt', ]), ]; } @@ -2129,7 +2129,7 @@ function install_check_requirements($install_state) { 'description' => t('@drupal requires read permissions to %file at all times. The webhosting issues documentation section offers help on this and other topics.', [ '@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, - ':handbook_url' => 'https://www.drupal.org/server-permissions' + ':handbook_url' => 'https://www.drupal.org/server-permissions', ]), ]; } @@ -2142,7 +2142,7 @@ function install_check_requirements($install_state) { 'description' => t('The @drupal installer requires write permissions to %file during the installation process. The webhosting issues documentation section offers help on this and other topics.', [ '@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, - ':handbook_url' => 'https://www.drupal.org/server-permissions' + ':handbook_url' => 'https://www.drupal.org/server-permissions', ]), ]; } @@ -2162,7 +2162,7 @@ function install_check_requirements($install_state) { '%file' => $file, '%default_file' => $default_file, ':install_txt' => base_path() . 'core/INSTALL.txt', - ':handbook_url' => 'https://www.drupal.org/server-permissions' + ':handbook_url' => 'https://www.drupal.org/server-permissions', ]), ]; } diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php index 5beee495b98080fd887bcb547ed95d8adb9c7509..6c162ed09531fbe312ffd9a2d392231aa96f569b 100644 --- a/core/lib/Drupal/Component/Utility/Html.php +++ b/core/lib/Drupal/Component/Utility/Html.php @@ -124,7 +124,7 @@ public static function cleanCssIdentifier($identifier, array $filter = [ // Identifiers cannot start with a digit, two hyphens, or a hyphen followed by a digit. $identifier = preg_replace([ '/^[0-9]/', - '/^(-[0-9])|^(--)/' + '/^(-[0-9])|^(--)/', ], ['_', '__'], $identifier); return $identifier; } diff --git a/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php b/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php index 0e4732e4995690b605ae2895c3ee92a4a7183d6f..b7f3a19fffe593478652eece1bbe9c8e63acb41c 100644 --- a/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php +++ b/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php @@ -38,7 +38,7 @@ public function blockForm($form, FormStateInterface $form_state) { */ protected function brokenMessage() { $build['message'] = [ - '#markup' => $this->t('This block is broken or missing. You may be missing content or you might need to enable the original module.') + '#markup' => $this->t('This block is broken or missing. You may be missing content or you might need to enable the original module.'), ]; return $build; diff --git a/core/lib/Drupal/Core/Config/PreExistingConfigException.php b/core/lib/Drupal/Core/Config/PreExistingConfigException.php index 31849caf6996bf796a3d97a25831ea77f68b33fb..a71604e16009344a1f5cc75dbbde7f5c3f720814 100644 --- a/core/lib/Drupal/Core/Config/PreExistingConfigException.php +++ b/core/lib/Drupal/Core/Config/PreExistingConfigException.php @@ -59,7 +59,7 @@ public static function create($extension, array $config_objects) { $message = new FormattableMarkup('Configuration objects (@config_names) provided by @extension already exist in active configuration', [ '@config_names' => implode(', ', static::flattenConfigObjects($config_objects)), - '@extension' => $extension + '@extension' => $extension, ] ); $e = new static($message); diff --git a/core/lib/Drupal/Core/Config/UnmetDependenciesException.php b/core/lib/Drupal/Core/Config/UnmetDependenciesException.php index 6c37c76372058bb4ce20c89c32db919535da63b4..573ec54849a02828ea7035ae5650fab5d252f0a0 100644 --- a/core/lib/Drupal/Core/Config/UnmetDependenciesException.php +++ b/core/lib/Drupal/Core/Config/UnmetDependenciesException.php @@ -92,7 +92,7 @@ public static function create($extension, array $config_objects) { $message = new FormattableMarkup('Configuration objects provided by %extension have unmet dependencies: %config_names', [ '%config_names' => static::formatConfigObjectList($config_objects), - '%extension' => $extension + '%extension' => $extension, ] ); $e = new static($message); diff --git a/core/lib/Drupal/Core/Diff/DiffFormatter.php b/core/lib/Drupal/Core/Diff/DiffFormatter.php index 1b3604d589ecb6a105b10f6811d0cd693860d524..52f5550abc9655afd7d6ebfdbdbf30fa47c4f6b6 100644 --- a/core/lib/Drupal/Core/Diff/DiffFormatter.php +++ b/core/lib/Drupal/Core/Diff/DiffFormatter.php @@ -57,7 +57,7 @@ protected function _block_header($xbeg, $xlen, $ybeg, $ylen) { [ 'data' => $ybeg + $this->line_stats['offset']['y'], 'colspan' => 2, - ] + ], ]; } @@ -94,7 +94,7 @@ protected function addedLine($line) { [ 'data' => ['#markup' => $line], 'class' => 'diff-context diff-addedline', - ] + ], ]; } @@ -116,7 +116,7 @@ protected function deletedLine($line) { [ 'data' => ['#markup' => $line], 'class' => 'diff-context diff-deletedline', - ] + ], ]; } @@ -135,7 +135,7 @@ protected function contextLine($line) { [ 'data' => ['#markup' => $line], 'class' => 'diff-context', - ] + ], ]; } diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php b/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php index c87c08dc0a247544e578fbaf8ce4208e9cf6a1ec..94af017758cfe827ae3224c06a1a2d0fb519287e 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php @@ -39,7 +39,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['deleted_translations'] = [ '#theme' => 'item_list', '#title' => $this->t('The following @entity-type translations will be deleted:', [ - '@entity-type' => $entity->getEntityType()->getLowercaseLabel() + '@entity-type' => $entity->getEntityType()->getLowercaseLabel(), ]), '#items' => $languages, ]; diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php index 958e26b042fde48b72e3baa9b6cd326e7ab0ceff..7aa0669e51dbb5514ff551e58cfc817bfd94ffed 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -133,7 +133,7 @@ public function form(array $form, FormStateInterface $form_state) { '#type' => 'container', '#weight' => 99, '#attributes' => [ - 'class' => ['entity-content-form-footer'] + 'class' => ['entity-content-form-footer'], ], '#optional' => TRUE, ]; diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php index 6c31df58b59787ce65b0072bd6205df29b3454e6..183e428ba344a92747b759c6433cc2bf5cb2a39d 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php @@ -144,7 +144,7 @@ public function getRenderer($field_name) { 'form_mode' => $this->originalMode, // No need to prepare, defaults have been merged in setComponent(). 'prepare' => FALSE, - 'configuration' => $configuration + 'configuration' => $configuration, ]); } else { @@ -330,7 +330,7 @@ public function getPluginCollections() { } return [ - 'widgets' => new EntityDisplayPluginCollection($this->pluginManager, $configurations) + 'widgets' => new EntityDisplayPluginCollection($this->pluginManager, $configurations), ]; } diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php index 7c7d62e04da3bfe0f5851b67efacbc7110cd41a6..cd36418d14ea62291363bc84db9d377d6cd9a875 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php @@ -201,7 +201,7 @@ public function getRenderer($field_name) { 'view_mode' => $this->originalMode, // No need to prepare, defaults have been merged in setComponent(). 'prepare' => FALSE, - 'configuration' => $configuration + 'configuration' => $configuration, ]); } else { @@ -301,7 +301,7 @@ public function getPluginCollections() { } return [ - 'formatters' => new EntityDisplayPluginCollection($this->pluginManager, $configurations) + 'formatters' => new EntityDisplayPluginCollection($this->pluginManager, $configurations), ]; } diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php index 5c3788761ee64500ebc289dbc0ea6499a5d410a6..dbda544ef050545719037f638285dd161d9e8492 100644 --- a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php @@ -164,7 +164,7 @@ protected function init() { // Extra fields are visible by default unless they explicitly say so. if (!isset($definition['visible']) || $definition['visible'] == TRUE) { $this->setComponent($name, [ - 'weight' => $definition['weight'] + 'weight' => $definition['weight'], ]); } else { diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php index 5114c40f8ea08f54b53949a6cad01355f07d9841..d058eb4372fd20e4ad3f8f9acb78c71652f0ef6e 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php +++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php @@ -97,7 +97,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { if ($bundle !== $entity_type_id) { $this->derivatives[$entity_type_id . ':' . $bundle] = [ 'label' => $bundle_info['label'], - 'constraints' => $this->derivatives[$entity_type_id]['constraints'] + 'constraints' => $this->derivatives[$entity_type_id]['constraints'], ] + $base_plugin_definition; } } diff --git a/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php b/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php index 0a99b331bf08e8098cb55f89c1c58e5130eba629..1415a1aba66ad13459a94f28d32a4930a5a0eb24 100644 --- a/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php +++ b/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php @@ -258,7 +258,7 @@ protected function getEditFormRoute(EntityTypeInterface $entity_type) { $route ->setDefaults([ '_entity_form' => "{$entity_type_id}.{$operation}", - '_title_callback' => '\Drupal\Core\Entity\Controller\EntityController::editTitle' + '_title_callback' => '\Drupal\Core\Entity\Controller\EntityController::editTitle', ]) ->setRequirement('_entity_access', "{$entity_type_id}.update") ->setOption('parameters', [ diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 9c123417cad50342e82771330639285d54e13f95..59cad4423abebd58ed744776d6c775a3d0aa4e34 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1168,7 +1168,7 @@ protected function initializeRevisionDataTable(ContentEntityTypeInterface $entit $entity_type_id . '__revision' => [ 'table' => $this->storage->getRevisionTable(), 'columns' => [$revision_key => $revision_key], - ] + ], ], ]; @@ -2043,7 +2043,7 @@ protected function getDedicatedTableSchema(FieldStorageDefinitionInterface $stor 'size' => 'tiny', 'not null' => TRUE, 'default' => 0, - 'description' => 'A boolean indicating whether this data item has been deleted' + 'description' => 'A boolean indicating whether this data item has been deleted', ], 'entity_id' => $id_schema, 'revision_id' => $revision_id_schema, diff --git a/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php index ea7d29fedfc176c86efa9a89684a6e0fb3bebcb0..6cda3b1859ce320de0d06559f006220455d4247c 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php @@ -214,19 +214,19 @@ protected function validateDependencies(ConfigImporter $config_importer) { if (!isset($core_extension['module'][$owner]) && isset($module_data[$owner])) { $message = $this->t('Configuration %name depends on the %owner module that will not be installed after import.', [ '%name' => $name, - '%owner' => $module_data[$owner]->info['name'] + '%owner' => $module_data[$owner]->info['name'], ]); } elseif (!isset($core_extension['theme'][$owner]) && isset($theme_data[$owner])) { $message = $this->t('Configuration %name depends on the %owner theme that will not be installed after import.', [ '%name' => $name, - '%owner' => $theme_data[$owner]->info['name'] + '%owner' => $theme_data[$owner]->info['name'], ]); } elseif (!isset($core_extension['module'][$owner]) && !isset($core_extension['theme'][$owner])) { $message = $this->t('Configuration %name depends on the %owner extension that will not be installed after import.', [ '%name' => $name, - '%owner' => $owner + '%owner' => $owner, ]); } diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index 45355cc3f6a2aa6df8eecee8a81c59944a8779b1..32b7d7fdf4acbfbf3a213768031d72dc8e22f02d 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -933,7 +933,7 @@ function hook_requirements($phase) { $requirements['drupal'] = [ 'title' => t('Drupal'), 'value' => \Drupal::VERSION, - 'severity' => REQUIREMENT_INFO + 'severity' => REQUIREMENT_INFO, ]; } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php index 43bbaa5309efb480a4ed003ba30227b2288f4227..43c4c980ee36c344e0221af94708688743c5bc81 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php @@ -118,7 +118,7 @@ protected function viewValue(FieldItemInterface $item) { // name. That only depends on formatter settings and no language condition. $languages = $this->getSetting('native_language') ? $this->languageManager->getNativeLanguages(LanguageInterface::STATE_ALL) : $this->languageManager->getLanguages(LanguageInterface::STATE_ALL); return [ - '#plain_text' => $item->language && isset($languages[$item->language->getId()]) ? $languages[$item->language->getId()]->getName() : '' + '#plain_text' => $item->language && isset($languages[$item->language->getId()]) ? $languages[$item->language->getId()]->getName() : '', ]; } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php index 22da3be420262eeb0b50ae94a6dd512ca307130d..379ff74db0cdda1e8fa0f784f5321c1eb25607be 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php @@ -52,7 +52,7 @@ public static function schema(FieldStorageDefinitionInterface $field_definition) 'type' => 'numeric', 'precision' => $field_definition->getSetting('precision'), 'scale' => $field_definition->getSetting('scale'), - ] + ], ], ]; } @@ -98,7 +98,7 @@ public function getConstraints() { 'value' => [ 'Regex' => [ 'pattern' => '/^[+-]?((\d+(\.\d*)?)|(\.\d+))$/i', - ] + ], ], ]); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php index ca30ede268112ff41b2d766750c6d0169f697796..a6801fc229f5f4e4d5678387d096f9637a2b6eee 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php @@ -59,7 +59,7 @@ public function getConstraints() { 'Length' => [ 'max' => Email::EMAIL_MAX_LENGTH, 'maxMessage' => t('%name: the email address can not be longer than @max characters.', ['%name' => $this->getFieldDefinition()->getLabel(), '@max' => Email::EMAIL_MAX_LENGTH]), - ] + ], ], ]); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index 3d839c270976ee8e59de40c4b45b1b8d79ba598a..e1b6c1bf5f899586a6ee82df9496a4d1abfbb9f1 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -679,8 +679,8 @@ public static function getPreconfiguredOptions() { 'field_storage_config' => [ 'settings' => [ 'target_type' => $entity_type->id(), - ] - ] + ], + ], ]; } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php index 23f5161f28b795a693a1929d6872459cc3d1450b..50eb767f9971118204c6660e4b9c063041041cf6 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php @@ -86,7 +86,7 @@ public function getConstraints() { 'Range' => [ 'min' => $min, 'minMessage' => t('%name: the value may be no less than %min.', ['%name' => $label, '%min' => $min]), - ] + ], ], ]); } @@ -98,7 +98,7 @@ public function getConstraints() { 'Range' => [ 'max' => $max, 'maxMessage' => t('%name: the value may be no greater than %max.', ['%name' => $label, '%max' => $max]), - ] + ], ], ]); } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php index d7f9bded440dcbac6418fdb655bd6ad860d12e27..493d6a4f67475e0ec205106f0360109485b149b3 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php @@ -107,7 +107,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen if ($this->getSelectionHandlerSetting('auto_create') && ($bundle = $this->getAutocreateBundle())) { $element['#autocreate'] = [ 'bundle' => $bundle, - 'uid' => ($entity instanceof EntityOwnerInterface) ? $entity->getOwnerId() : \Drupal::currentUser()->id() + 'uid' => ($entity instanceof EntityOwnerInterface) ? $entity->getOwnerId() : \Drupal::currentUser()->id(), ]; } diff --git a/core/lib/Drupal/Core/Field/PluginSettingsBase.php b/core/lib/Drupal/Core/Field/PluginSettingsBase.php index 073bd2c787e1ac956f8cdd58c319038a667e36d5..4e38e755f1428897efd4e3ba4b457f5b6710895a 100644 --- a/core/lib/Drupal/Core/Field/PluginSettingsBase.php +++ b/core/lib/Drupal/Core/Field/PluginSettingsBase.php @@ -141,7 +141,7 @@ public function calculateDependencies() { if (!empty($this->thirdPartySettings)) { // Create dependencies on any modules providing third party settings. return [ - 'module' => array_keys($this->thirdPartySettings) + 'module' => array_keys($this->thirdPartySettings), ]; } return []; diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index b50fe9942810be7db123eb618ae2aaa78cbf3e58..d94b9109b6dd5ecf08d473556a90e2d1b8c254f7 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -778,9 +778,9 @@ public function prepareForm($form_id, &$form, FormStateInterface &$form_state) { '#attached' => [ 'placeholders' => [ $placeholder => [ - '#lazy_builder' => ['form_builder:renderFormTokenPlaceholder', [$placeholder]] - ] - ] + '#lazy_builder' => ['form_builder:renderFormTokenPlaceholder', [$placeholder]], + ], + ], ], '#cache' => [ 'max-age' => 0, diff --git a/core/lib/Drupal/Core/Form/form.api.php b/core/lib/Drupal/Core/Form/form.api.php index 4154412eedc2c7e4b732693617e10930d38c486e..0189bf467ca90f90155644f8f61287ce5867171b 100644 --- a/core/lib/Drupal/Core/Form/form.api.php +++ b/core/lib/Drupal/Core/Form/form.api.php @@ -129,7 +129,7 @@ function callback_batch_finished($success, $results, $operations) { $error_operation = reset($operations); $message = t('An error occurred while processing %error_operation with arguments: @arguments', [ '%error_operation' => $error_operation[0], - '@arguments' => print_r($error_operation[1], TRUE) + '@arguments' => print_r($error_operation[1], TRUE), ]); \Drupal::messenger()->addError($message); } diff --git a/core/lib/Drupal/Core/Http/ClientFactory.php b/core/lib/Drupal/Core/Http/ClientFactory.php index 3dcf35374ebd2f81f6694f854a0ea3e1bc8c903c..e429bbb9cda4734f9c83db529e53afee50d4b3ca 100644 --- a/core/lib/Drupal/Core/Http/ClientFactory.php +++ b/core/lib/Drupal/Core/Http/ClientFactory.php @@ -58,7 +58,7 @@ public function fromOptions(array $config = []) { 'http' => NULL, 'https' => NULL, 'no' => [], - ] + ], ]; $config = NestedArray::mergeDeep($default_config, Settings::get('http_client_config', []), $config); diff --git a/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php b/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php index 300def99319f9423a314370bbba51eb1dd54b587..651e9f58e807ff666ee7bfacbc3961284cb51576 100644 --- a/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php +++ b/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php @@ -124,7 +124,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['settings'][$key]['#states'] = [ 'visible' => [ ':input[name=driver]' => ['value' => $key], - ] + ], ]; } diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php index c6514962d6371029d28881416578b71808836555..aab333acde6359c50bae536e9630b0dfd1722dbf 100644 --- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php +++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php @@ -63,7 +63,7 @@ public function getAll() { 'SELECT name, value FROM {' . $this->connection->escapeTable($this->table) . '} WHERE collection = :collection AND expire > :now', [ ':collection' => $this->collection, - ':now' => REQUEST_TIME + ':now' => REQUEST_TIME, ])->fetchAllKeyed(); return array_map([$this->serializer, 'decode'], $values); } diff --git a/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php b/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php index 8afcefe21f7d4076f1fb2c65ab0b8e779f04d2e5..cf2ac5f992d8b1e78a7f785a45fce18a60e4a557 100644 --- a/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php +++ b/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php @@ -251,20 +251,20 @@ public function schemaDefinition() { 'type' => 'varchar_ascii', 'length' => 255, 'not null' => TRUE, - 'default' => '' + 'default' => '', ], 'value' => [ 'description' => 'A value for the semaphore.', 'type' => 'varchar_ascii', 'length' => 255, 'not null' => TRUE, - 'default' => '' + 'default' => '', ], 'expire' => [ 'description' => 'A Unix timestamp with microseconds indicating when the semaphore should expire.', 'type' => 'float', 'size' => 'big', - 'not null' => TRUE + 'not null' => TRUE, ], ], 'indexes' => [ diff --git a/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php index 89f39a8460c14017f25ca6618a8caa5f470a72df..60b727767163ab1a8ce56c7ef0806eb27ef45f8c 100644 --- a/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php +++ b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php @@ -65,7 +65,7 @@ public static function preRenderCompactLink($element) { $element['#url'] = BaseUrl::fromRoute('system.admin_compact_page', ['mode' => 'off']); $element['#options'] = [ 'attributes' => ['title' => t('Expand layout to include descriptions.')], - 'query' => \Drupal::destination()->getAsArray() + 'query' => \Drupal::destination()->getAsArray(), ]; } else { diff --git a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php index 5966668af3506fcf0e54963f256930a2436166d6..13e9c7675f3f85bcf20781decf5d86ed32040d60 100644 --- a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php +++ b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php @@ -226,7 +226,7 @@ protected function prepare(array $main_content, Request $request, RouteMatchInte return $this->renderer->render($main_content, FALSE); }); $main_content = $this->renderCache->getCacheableRenderArray($main_content) + [ - '#title' => isset($main_content['#title']) ? $main_content['#title'] : NULL + '#title' => isset($main_content['#title']) ? $main_content['#title'] : NULL, ]; } diff --git a/core/lib/Drupal/Core/Render/RenderCache.php b/core/lib/Drupal/Core/Render/RenderCache.php index 9ac338124cdf2d9c70c5dc1cdbfc7532125fdef2..20e4b0c142bc6e6b02d73beb7ff3ed0330e049e6 100644 --- a/core/lib/Drupal/Core/Render/RenderCache.php +++ b/core/lib/Drupal/Core/Render/RenderCache.php @@ -259,7 +259,7 @@ public function set(array &$elements, array $pre_bubbling_elements) { '#cache' => [ 'keys' => $elements['#cache']['keys'], 'contexts' => $redirect_cacheability_updated->getCacheContexts(), - ] + ], ]; $cid = $this->createCacheID($recalculated_cid_pseudo_element); // Ensure the about-to-be-cached data uses the merged cache contexts. diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index bae83de7461d0bb11e21d4f04f1b348f9f41dcd3..5e1b8d1b8dd17d00cece3f958dbb022fb0ce075f 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -326,7 +326,7 @@ protected function doRender(&$elements, $is_root_call = FALSE) { // automatically by the Renderer. Adding them as though they are // supported allows us to avoid throwing an exception 100% of the time. '#weight', - '#printed' + '#printed', ]; $unsupported_keys = array_diff(array_keys($elements), $supported_keys); if (count($unsupported_keys)) { diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php index f71e2e11420391ab229b908e388d4b006399998c..be11f80049795774aef1f08b00a1c8702baa6dc1 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php @@ -73,7 +73,7 @@ public function validate($value, Constraint $constraint) { if (!$valid) { // @todo: Provide a good violation message for each problem. $this->context->addViolation($constraint->message, [ - '%value' => is_object($value) ? get_class($value) : (is_array($value) ? 'Array' : (string) $value) + '%value' => is_object($value) ? get_class($value) : (is_array($value) ? 'Array' : (string) $value), ]); } } diff --git a/core/modules/action/src/Form/ActionAdminManageForm.php b/core/modules/action/src/Form/ActionAdminManageForm.php index 627e1ed327e585a3763ec6b9b7ffb87f0870287a..51fdfabdb3b051720186f7c6964fc2ae59c9ca39 100644 --- a/core/modules/action/src/Form/ActionAdminManageForm.php +++ b/core/modules/action/src/Form/ActionAdminManageForm.php @@ -72,7 +72,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#empty_option' => $this->t('- Select -'), ]; $form['parent']['actions'] = [ - '#type' => 'actions' + '#type' => 'actions', ]; $form['parent']['actions']['submit'] = [ '#type' => 'submit', diff --git a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php index 1737715f8a5fb187988dbc0075947dd96adea478..928b3c9b812864d54f92f056fba86b7eb44315b4 100644 --- a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php +++ b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php @@ -40,7 +40,7 @@ public function testActions() { $this->assertEntity('send_e_mail', 'Send e-mail', 'system', [ "recipient" => "test@example.com", "subject" => "Drupal migration test", - "message" => "Drupal migration test" + "message" => "Drupal migration test", ]); $this->assertEntity('redirect_to_url', 'Redirect to URL', 'system', ["url" => "https://www.drupal.org"]); diff --git a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php index 1601449d6744221e743cdbafb2fc545ab803c7ee..47049f33c6efc1cd325ef3aaa62495ef8c190f3c 100644 --- a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php +++ b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php @@ -40,7 +40,7 @@ public function testActions() { $this->assertEntity('send_e_mail', 'Send e-mail', 'system', [ "recipient" => "test@example.com", "subject" => "Drupal migration test", - "message" => "Drupal migration test" + "message" => "Drupal migration test", ]); $this->assertEntity('redirect_to_url', 'Redirect to URL', 'system', ["url" => "https://www.drupal.org"]); diff --git a/core/modules/action/tests/src/Kernel/Plugin/Action/EmailActionTest.php b/core/modules/action/tests/src/Kernel/Plugin/Action/EmailActionTest.php index 925fb3fcd04b7f608a05489e76a26bda8beb314a..a47f9b35f74e5aaa70f4f7f92db6fac8def2f26d 100644 --- a/core/modules/action/tests/src/Kernel/Plugin/Action/EmailActionTest.php +++ b/core/modules/action/tests/src/Kernel/Plugin/Action/EmailActionTest.php @@ -36,7 +36,7 @@ public function testEmailAction() { $configuration = [ 'recipient' => 'test@example.com', 'subject' => 'Test subject', - 'message' => 'Test message' + 'message' => 'Test message', ]; $plugin_manager ->createInstance('action_send_email_action', $configuration) diff --git a/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php b/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php index 3df80a325884981cc8d2a2b9ad74daef93825ad1..d55cab2664eaf08086a1f16cd563e1f826e28a5a 100644 --- a/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php +++ b/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php @@ -100,7 +100,7 @@ public function fetch(FeedInterface $feed) { 'allow_redirects' => [ 'on_redirect' => function (RequestInterface $request, ResponseInterface $response, UriInterface $uri) use (&$actual_uri) { $actual_uri = (string) $uri; - } + }, ], ])->send($request); diff --git a/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php b/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php index 267cc3447c12a290c16952fc5e075e852a404b15..2ce7820a7dbe85abc56c0ca525839fcbf8449330 100644 --- a/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php +++ b/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php @@ -27,7 +27,7 @@ public function providerSource() { [ 'iid' => 1, 'ip' => '127.0.0.1', - ] + ], ]; $tests[0]['expected_data'] = [ [ diff --git a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php index 50e618bee1e125ab1871795367d1ec19c3c78548..20bedcb383138ffbb16404cf11253015f3bd2fd2 100644 --- a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php +++ b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php @@ -39,7 +39,7 @@ public function regression2802923() { public static function currentTime() { return [ '#markup' => '', - '#cache' => ['max-age' => 0] + '#cache' => ['max-age' => 0], ]; } diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php index e3da529ea46d6cda33df3bef2b7e2865ab610ff6..f274356139da1eac955f5e3ac31aa187db71d204 100644 --- a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php +++ b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php @@ -52,7 +52,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf [ '#lazy_builder' => [ 'Drupal\Core\Render\Element\StatusMessages::renderMessages', - [NULL] + [NULL], ], ] ); @@ -129,7 +129,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf [ '#lazy_builder' => [ 'route_processor_csrf:renderPlaceholderCsrfToken', - ['admin/config/user-interface/shortcut/manage/default/add-link-inline'] + ['admin/config/user-interface/shortcut/manage/default/add-link-inline'], ], ] ); @@ -155,14 +155,14 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf '#attached' => [ 'placeholders' => [ ' ['#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::helloOrYarhar', []]], - ] + ], ], ], ' [ 'hello_or_yarhar', - [] + [], ], ] ); @@ -188,9 +188,9 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf '#pre_render' => [ '\Drupal\big_pipe_test\BigPipeTestController::currentTime', ], - ] - ] - ] + ], + ], + ], ], '', [ diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php index 2405aff5d1c9bbe0f91d0bf17d7535c42b3febdb..baa5f708f05282d5ab5b296a49cd1336e1b033b5 100644 --- a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php +++ b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php @@ -91,7 +91,7 @@ public function multiOccurrence() { public static function currentTime() { return [ '#markup' => '', - '#cache' => ['max-age' => 0] + '#cache' => ['max-age' => 0], ]; } diff --git a/core/modules/block/block.install b/core/modules/block/block.install index 6545a1997a590fea155dc6b36c6c5a21654a637f..50b27585f36b12529e16546f7d4f115a10961894 100644 --- a/core/modules/block/block.install +++ b/core/modules/block/block.install @@ -73,7 +73,7 @@ function block_update_8001() { // their own updates. $update_backup[$block->get('id')] = [ 'missing_context_ids' => $backup_values, - 'status' => $block->get('status') + 'status' => $block->get('status'), ]; } } diff --git a/core/modules/block/block.post_update.php b/core/modules/block/block.post_update.php index d5f0852a3cc2a99e456aa8f4465072c06a6e7529..0d49ead480b4b480aab674479e48aff990b21c11 100644 --- a/core/modules/block/block.post_update.php +++ b/core/modules/block/block.post_update.php @@ -60,7 +60,7 @@ function block_post_update_disable_blocks_with_missing_contexts() { foreach ($blocks as $disabled_block_id => $disabled_block) { $message .= '
  • ' . t('@label (Visibility: @plugin_ids)', [ '@label' => $disabled_block->get('settings')['label'], - '@plugin_ids' => implode(', ', array_intersect_key($condition_plugin_id_label_map, array_flip(array_keys($block_update_8001[$disabled_block_id]['missing_context_ids'])))) + '@plugin_ids' => implode(', ', array_intersect_key($condition_plugin_id_label_map, array_flip(array_keys($block_update_8001[$disabled_block_id]['missing_context_ids'])))), ]) . '
  • '; } $message .= ''; diff --git a/core/modules/block/src/BlockListBuilder.php b/core/modules/block/src/BlockListBuilder.php index facd02443c1e1868cd85996944b693403162112a..c1ccc504dbcacc811770079ef20b7c60ed26e105 100644 --- a/core/modules/block/src/BlockListBuilder.php +++ b/core/modules/block/src/BlockListBuilder.php @@ -222,7 +222,7 @@ protected function buildBlocksForm() { '#theme_wrappers' => [ 'container' => [ '#attributes' => ['class' => 'region-title__action'], - ] + ], ], '#prefix' => $title, '#type' => 'link', diff --git a/core/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php b/core/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php index a86db68dfcf36c1d5843eebb4c96e13e85b630d8..d262f445df599d701b5f358da687863e2ab11c0c 100644 --- a/core/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php +++ b/core/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php @@ -25,7 +25,7 @@ public function getFormId() { public function buildForm(array $form, FormStateInterface $form_state) { $form['favorite_animal'] = [ '#type' => 'textfield', - '#title' => $this->t('Your favorite animal.') + '#title' => $this->t('Your favorite animal.'), ]; $form['submit_animal'] = [ diff --git a/core/modules/block/tests/modules/block_test/src/Form/TestForm.php b/core/modules/block/tests/modules/block_test/src/Form/TestForm.php index 7619d842d140954ece1350ad0ca9d585fa124c15..55b13f78258005703a87b08f7688bd88b39baff4 100644 --- a/core/modules/block/tests/modules/block_test/src/Form/TestForm.php +++ b/core/modules/block/tests/modules/block_test/src/Form/TestForm.php @@ -25,7 +25,7 @@ public function getFormId() { public function buildForm(array $form, FormStateInterface $form_state) { $form['email'] = [ '#type' => 'email', - '#title' => $this->t('Your .com email address.') + '#title' => $this->t('Your .com email address.'), ]; $form['show'] = [ diff --git a/core/modules/block/tests/src/Functional/BlockLanguageTest.php b/core/modules/block/tests/src/Functional/BlockLanguageTest.php index cf1b87720a2472c0825e09b8792b8659a034a9ce..8f963e17e64a040c54468cc64eba5e4700dce1ef 100644 --- a/core/modules/block/tests/src/Functional/BlockLanguageTest.php +++ b/core/modules/block/tests/src/Functional/BlockLanguageTest.php @@ -164,7 +164,7 @@ public function testMultipleLanguageTypes() { // Change visibility to now depend on content language for this block. $edit = [ - 'visibility[language][context_mapping][language]' => '@language.current_language_context:language_content' + 'visibility[language][context_mapping][language]' => '@language.current_language_context:language_content', ]; $this->drupalPostForm('admin/structure/block/manage/' . $block_id, $edit, t('Save block')); diff --git a/core/modules/block/tests/src/Functional/BlockTest.php b/core/modules/block/tests/src/Functional/BlockTest.php index 7518c82dc136e7351421733889510c7829044f64..53b48662cd234f1d22ffcfef4914d12a201b901e 100644 --- a/core/modules/block/tests/src/Functional/BlockTest.php +++ b/core/modules/block/tests/src/Functional/BlockTest.php @@ -146,7 +146,7 @@ public function testAddBlockFromLibraryWithWeight() { $block_name = 'system_powered_by_block'; $add_url = Url::fromRoute('block.admin_add', [ 'plugin_id' => $block_name, - 'theme' => $default_theme + 'theme' => $default_theme, ]); $links = $this->xpath('//a[contains(@href, :href)]', [':href' => $add_url->toString()]); $this->assertEqual(1, count($links), 'Found one matching link.'); @@ -537,14 +537,14 @@ public function testBlockUserRoleDelete() { $this->assertEqual($block->getVisibility()['user_role']['roles'], [ $role1->id() => $role1->id(), - $role2->id() => $role2->id() + $role2->id() => $role2->id(), ]); $role1->delete(); $block = Block::load($block->id()); $this->assertEqual($block->getVisibility()['user_role']['roles'], [ - $role2->id() => $role2->id() + $role2->id() => $role2->id(), ]); } diff --git a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php index d37f8c796426b0830b6d450f37654e8992a42808..66c2679bb052e9f684bf8213ff56959237282b84 100644 --- a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php +++ b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php @@ -87,7 +87,7 @@ public function providerSource() { 'schema_version' => '6055', 'weight' => '0', 'info' => 'a:0:{}', - ] + ], ]; // The expected results. @@ -104,7 +104,7 @@ public function providerSource() { 'pages' => '', 'title' => 'Test Title 01', 'cache' => -1, - 'roles' => [2] + 'roles' => [2], ], [ 'bid' => 2, @@ -118,7 +118,7 @@ public function providerSource() { 'pages' => '', 'title' => 'Test Title 02', 'cache' => -1, - 'roles' => [2] + 'roles' => [2], ], ]; return $tests; diff --git a/core/modules/block/tests/src/Unit/BlockRepositoryTest.php b/core/modules/block/tests/src/Unit/BlockRepositoryTest.php index 5584b0bfdda8aa4cbd82d205eb6ce059e87bb1e7..f522b2b8422868a66422fc325db6ecc890f39399 100644 --- a/core/modules/block/tests/src/Unit/BlockRepositoryTest.php +++ b/core/modules/block/tests/src/Unit/BlockRepositoryTest.php @@ -118,21 +118,21 @@ public function testGetVisibleBlocksPerRegion(array $blocks_config, array $expec public function providerBlocksConfig() { $blocks_config = [ 'block1' => [ - AccessResult::allowed(), 'top', 0 + AccessResult::allowed(), 'top', 0, ], // Test a block without access. 'block2' => [ - AccessResult::forbidden(), 'bottom', 0 + AccessResult::forbidden(), 'bottom', 0, ], // Test some blocks in the same region with specific weight. 'block4' => [ - AccessResult::allowed(), 'bottom', 5 + AccessResult::allowed(), 'bottom', 5, ], 'block3' => [ - AccessResult::allowed(), 'bottom', 5 + AccessResult::allowed(), 'bottom', 5, ], 'block5' => [ - AccessResult::allowed(), 'bottom', -5 + AccessResult::allowed(), 'bottom', -5, ], ]; @@ -142,7 +142,7 @@ public function providerBlocksConfig() { 'top' => ['block1'], 'center' => [], 'bottom' => ['block5', 'block3', 'block4'], - ] + ], ]; return $test_cases; } diff --git a/core/modules/block_content/src/Controller/BlockContentController.php b/core/modules/block_content/src/Controller/BlockContentController.php index ff10ff0558f5b59a1f17edc302f9323ba293d414..08408a16b002c3463b359d09d38d85478998a7dd 100644 --- a/core/modules/block_content/src/Controller/BlockContentController.php +++ b/core/modules/block_content/src/Controller/BlockContentController.php @@ -103,7 +103,7 @@ public function add(Request $request) { */ public function addForm(BlockContentTypeInterface $block_content_type, Request $request) { $block = $this->blockContentStorage->create([ - 'type' => $block_content_type->id() + 'type' => $block_content_type->id(), ]); if (($theme = $request->query->get('theme')) && in_array($theme, array_keys($this->themeHandler->listInfo()))) { // We have navigated to this page from the block library and will keep track diff --git a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php index 5e09be8b58e07284be4418a14440789e1897fbcb..54f7ad58e1d3fde8fb119937f1c51b8053f7508b 100644 --- a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php +++ b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php @@ -190,9 +190,9 @@ public function build() { return [ '#markup' => $this->t('Block with uuid %uuid does not exist. Add custom block.', [ '%uuid' => $this->getDerivativeId(), - ':url' => $this->urlGenerator->generate('block_content.add_page') + ':url' => $this->urlGenerator->generate('block_content.add_page'), ]), - '#access' => $this->account->hasPermission('administer blocks') + '#access' => $this->account->hasPermission('administer blocks'), ]; } } diff --git a/core/modules/block_content/src/Plugin/Derivative/BlockContent.php b/core/modules/block_content/src/Plugin/Derivative/BlockContent.php index 25806c5f1327002ee1904bbc87794d59857f1357..ac82a6c39caa0b55512983d3f5bf85552f5625e6 100644 --- a/core/modules/block_content/src/Plugin/Derivative/BlockContent.php +++ b/core/modules/block_content/src/Plugin/Derivative/BlockContent.php @@ -51,7 +51,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { $this->derivatives[$block_content->uuid()] = $base_plugin_definition; $this->derivatives[$block_content->uuid()]['admin_label'] = $block_content->label(); $this->derivatives[$block_content->uuid()]['config_dependencies']['content'] = [ - $block_content->getConfigDependencyName() + $block_content->getConfigDependencyName(), ]; } return parent::getDerivativeDefinitions($base_plugin_definition); diff --git a/core/modules/block_content/src/Tests/BlockContentTestBase.php b/core/modules/block_content/src/Tests/BlockContentTestBase.php index f277f53d7fc5a6d5fcea90c557460dbe5bdad706..a60ab91d4bf6a4de41846a221187cc2b95a09760 100644 --- a/core/modules/block_content/src/Tests/BlockContentTestBase.php +++ b/core/modules/block_content/src/Tests/BlockContentTestBase.php @@ -34,7 +34,7 @@ abstract class BlockContentTestBase extends WebTestBase { * @var array */ protected $permissions = [ - 'administer blocks' + 'administer blocks', ]; /** @@ -83,7 +83,7 @@ protected function createBlockContent($title = FALSE, $bundle = 'basic', $save = $block_content = BlockContent::create([ 'info' => $title, 'type' => $bundle, - 'langcode' => 'en' + 'langcode' => 'en', ]); if ($block_content && $save === TRUE) { $block_content->save(); diff --git a/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php b/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php index ea48e37753901398e158c8f38907021c138f8cd4..0e3fbfeeb0099cece8985748de7cfd7bb820ba76 100644 --- a/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php +++ b/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php @@ -99,7 +99,7 @@ protected function createBlockContentType(array $values = []) { $values += [ 'id' => $id, 'label' => $id, - 'revision' => FALSE + 'revision' => FALSE, ]; $bundle = BlockContentType::create($values); $status = $bundle->save(); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php index 59f111b9658fd8d958c16cf7738d7f8daf595267..683500928508bf98dd616435415506dc68b9d05e 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php @@ -29,7 +29,7 @@ protected function createEntity() { $block_content_type = BlockContentType::create([ 'id' => 'basic', 'label' => 'basic', - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); block_content_add_body_field($block_content_type->id()); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php index 7447f33a628e0beecf67529b79e6a1fd44a869c4..46768d694b249bee1a1e74a992023f129a95ddc3 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php @@ -29,7 +29,7 @@ class BlockContentCreationTest extends BlockContentTestBase { */ protected $permissions = [ 'administer blocks', - 'administer block_content display' + 'administer block_content display', ]; /** @@ -55,7 +55,7 @@ public function testBlockContentCreation() { // Check that the Basic block has been created. $this->assertRaw(format_string('@block %name has been created.', [ '@block' => 'basic', - '%name' => $edit['info[0][value]'] + '%name' => $edit['info[0][value]'], ]), 'Basic block created.'); // Check that the view mode setting is hidden because only one exists. @@ -74,7 +74,7 @@ public function testBlockContentCreation() { // Check that the Basic block has been created. $this->assertRaw(format_string('A custom block with block description %value already exists.', [ - '%value' => $edit['info[0][value]'] + '%value' => $edit['info[0][value]'], ])); $this->assertResponse(200); } @@ -104,7 +104,7 @@ public function testBlockContentCreationMultipleViewModes() { // Check that the Basic block has been created. $this->assertRaw(format_string('@block %name has been created.', [ '@block' => 'basic', - '%name' => $edit['info[0][value]'] + '%name' => $edit['info[0][value]'], ]), 'Basic block created.'); // Save our block permanently @@ -156,7 +156,7 @@ public function testBlockContentCreationMultipleViewModes() { // Check that the Basic block has been created. $this->assertRaw(format_string('A custom block with block description %value already exists.', [ - '%value' => $edit['info[0][value]'] + '%value' => $edit['info[0][value]'], ])); $this->assertResponse(200); } diff --git a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php index 0f7ae5a2e6896f344bc3bd8bd181c98952da66eb..fe730e8a0c4da36cc0afd5936ed857069966e0c2 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php @@ -39,7 +39,7 @@ public function testImport() { 'info' => $info, 'body' => ['value' => $this->randomMachineName(32)], 'type' => 'basic', - 'id' => $test_id + 'id' => $test_id, ]; $block = BlockContent::create($block_array); $block->enforceIsNew(TRUE); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php index 1fdd0ef56175b0eba152b7ccb24ef10780d1a4d8..c8c32fdacfb03018858b7fb9bcb90d007cffeaf9 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php @@ -31,7 +31,7 @@ abstract class BlockContentTestBase extends BrowserTestBase { * @var array */ protected $permissions = [ - 'administer blocks' + 'administer blocks', ]; /** @@ -80,7 +80,7 @@ protected function createBlockContent($title = FALSE, $bundle = 'basic', $save = $block_content = BlockContent::create([ 'info' => $title, 'type' => $bundle, - 'langcode' => 'en' + 'langcode' => 'en', ]); if ($block_content && $save === TRUE) { $block_content->save(); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php index ccf5b32cc455985000fbf8c5c6a1e21430a611a0..6fc5f1af01324ce87c2f053e0cd0f6a0e3d2d83c 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php @@ -23,7 +23,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase { 'content_translation', 'block', 'field_ui', - 'block_content' + 'block_content', ]; /** @@ -59,7 +59,7 @@ protected function setupBundle() { $bundle = BlockContentType::create([ 'id' => $this->bundle, 'label' => $this->bundle, - 'revision' => FALSE + 'revision' => FALSE, ]); $bundle->save(); } @@ -72,7 +72,7 @@ public function getTranslatorPermissions() { 'translate any entity', 'access administration pages', 'administer blocks', - 'administer block_content fields' + 'administer block_content fields', ]); } @@ -95,7 +95,7 @@ protected function createBlockContent($title = FALSE, $bundle = FALSE) { $block_content = BlockContent::create([ 'info' => $title, 'type' => $bundle, - 'langcode' => 'en' + 'langcode' => 'en', ]); $block_content->save(); return $block_content; @@ -161,7 +161,7 @@ public function testDisabledBundle() { $bundle = BlockContentType::create([ 'id' => $disabled_bundle, 'label' => $disabled_bundle, - 'revision' => FALSE + 'revision' => FALSE, ]); $bundle->save(); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php index 8105d3fd00918aedca24c1d6d5df13b0c30d73f1..b707c83a92c0e590e87c15a2ed64bc0024fcbf89 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php @@ -29,7 +29,7 @@ class BlockContentTypeTest extends BlockContentTestBase { */ protected $permissions = [ 'administer blocks', - 'administer block_content fields' + 'administer block_content fields', ]; /** diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php index 0ddcfbc137b046d484483b953b2950ac86887375..dd14a4266cb3b45a9762effe22dbbe505c81f412 100644 --- a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php +++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php @@ -94,7 +94,7 @@ protected function createBlockContentType(array $values = []) { $values += [ 'id' => $id, 'label' => $id, - 'revision' => FALSE + 'revision' => FALSE, ]; $bundle = BlockContentType::create($values); $status = $bundle->save(); diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 1b40475c1d25d09734e26bf9ad783b1c0520862e..b5d5515969f01cff45d4e40dbd86e2deb2c5a449 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -111,7 +111,7 @@ function book_node_links_alter(array &$links, NodeInterface $node, array &$conte 'type' => 'html', 'node' => $node->id(), ]), - 'attributes' => ['title' => t('Show a printer-friendly version of this book page and its sub-pages.')] + 'attributes' => ['title' => t('Show a printer-friendly version of this book page and its sub-pages.')], ]; } } diff --git a/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php b/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php index e8505212dc80f569a0c69b7e3615b03e6363112e..1d0e25365ae3dc0fd86350b9a05dbd6fd8a74652 100644 --- a/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php +++ b/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php @@ -38,7 +38,7 @@ protected function setUp() { 'd7_user', 'd7_node_type', 'd7_node', - 'd7_book' + 'd7_book', ]); } diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php index 64e764ebf565652e521e7a3728881e1e03864364..45b97e77bc1c109167a6d15b2fa53ce2103d0a3f 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php @@ -70,7 +70,7 @@ public function getConfig(Editor $editor) { */ public function getCssFiles(Editor $editor) { return [ - drupal_get_path('module', 'ckeditor') . '/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css' + drupal_get_path('module', 'ckeditor') . '/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css', ]; } diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php index ffae4096cf28a2410f8def7bd27d5735d6e97cd7..0cc6b58e6936ff1fc7e1ab0685c1d393b81db8ea 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php @@ -128,7 +128,7 @@ public function settingsForm(array $form, FormStateInterface $form_state, Editor */ public function getCssFiles(Editor $editor) { return [ - drupal_get_path('module', 'ckeditor') . '/css/plugins/language/ckeditor.language.css' + drupal_get_path('module', 'ckeditor') . '/css/plugins/language/ckeditor.language.css', ]; } diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php index 2f14bca89a9997632a69834b7331c1f5b7aec6d9..5e45bde777424439876a5f969b09b3b584316853 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php @@ -157,7 +157,7 @@ protected function generateStylesSetSetting($styles) { ]; if (!empty($classes)) { $configured_style['attributes'] = [ - 'class' => implode(' ', array_map('trim', $classes)) + 'class' => implode(' ', array_map('trim', $classes)), ]; } $styles_set[] = $configured_style; diff --git a/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php index 49ab1b30dd3b4b26d86263d24998a878a967d331..ee4a4d0edb8afbb9196f16a4f4a7c21786f9e2d5 100644 --- a/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php +++ b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php @@ -210,8 +210,8 @@ public function settingsForm(array $form, FormStateInterface $form_state, Editor 0 => [ 'name' => 'All existing buttons', 'items' => $all_buttons, - ] - ] + ], + ], ], ], 'plugins' => $settings['plugins'], diff --git a/core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php b/core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php index e0901dc84ff706a65fd535d39734ea577ab599a2..1312658d70ebf7c8d58bbca968ecb4ceda0a7beb 100644 --- a/core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php +++ b/core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php @@ -32,7 +32,7 @@ public function getButtons() { */ public function getCssFiles(Editor $editor) { return [ - drupal_get_path('module', 'ckeditor_test') . '/css/llama.css' + drupal_get_path('module', 'ckeditor_test') . '/css/llama.css', ]; } diff --git a/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php b/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php index eb02d37adad14ad526b429c3e2abf568c2445fee..5664728ec30253c07651ae5bae6e935dc1d4aa99 100644 --- a/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php +++ b/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php @@ -151,7 +151,7 @@ public function testCssFiles() { // Case 2: CKEditor iframe instance CSS file. $expected = [ - 'llama_css' => [drupal_get_path('module', 'ckeditor_test') . '/css/llama.css'] + 'llama_css' => [drupal_get_path('module', 'ckeditor_test') . '/css/llama.css'], ]; $this->assertIdentical($expected, $this->manager->getCssFiles($editor), 'Iframe instance CSS file found.'); } diff --git a/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php b/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php index 4f1da31834088608203b51e16bf9f988e021f691..de4c23fe839e97b63032e0f7e6468f4c411c086d 100644 --- a/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php +++ b/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php @@ -50,7 +50,7 @@ protected function setUp() { 'status' => 1, 'settings' => [ 'allowed_html' => '


    ', - ] + ], ], ], ]); diff --git a/core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php b/core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php index 6b9f9af87e36d26bc8011cd2de4b22543711edc0..dfa1f163f7ea918852edf300d65ac81c47c2b1d6 100644 --- a/core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php +++ b/core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php @@ -20,7 +20,7 @@ public function providerGetEnabledButtons() { return [ 'empty' => [ [], - [] + [], ], '1 row, 1 group' => [ [ @@ -28,9 +28,9 @@ public function providerGetEnabledButtons() { [ // Group 1. ['name' => 'Formatting', 'items' => ['Bold', 'Italic']], - ] + ], ], - ['Bold', 'Italic'] + ['Bold', 'Italic'], ], '1 row, >1 groups' => [ [ @@ -42,7 +42,7 @@ public function providerGetEnabledButtons() { ['name' => 'Linking', 'items' => ['Link']], ], ], - ['Bold', 'Italic', 'Link'] + ['Bold', 'Italic', 'Link'], ], '2 rows, 1 group each' => [ [ @@ -76,7 +76,7 @@ public function providerGetEnabledButtons() { ['name' => 'Advanced', 'items' => ['Llama']], ], ], - ['Bold', 'Italic', 'Link', 'Source', 'Llama'] + ['Bold', 'Italic', 'Link', 'Source', 'Llama'], ], ]; } diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php index 69c508ae038f51e5ed54ae2e4361b5080cbac231..2c7da35b248cd60c65c6e409809db30ebec78d48 100644 --- a/core/modules/comment/src/CommentForm.php +++ b/core/modules/comment/src/CommentForm.php @@ -379,7 +379,7 @@ public function save(array $form, FormStateInterface $form_state) { // Add a log entry. $logger->notice('Comment posted: %subject.', [ '%subject' => $comment->getSubject(), - 'link' => $this->l(t('View'), $comment->urlInfo()->setOption('fragment', 'comment-' . $comment->id())) + 'link' => $this->l(t('View'), $comment->urlInfo()->setOption('fragment', 'comment-' . $comment->id())), ]); // Explain the approval queue if necessary. diff --git a/core/modules/comment/src/CommentTypeForm.php b/core/modules/comment/src/CommentTypeForm.php index 401ce8f25f6130d166095fba43313fce5365d909..fd7125846c6a7d46287705fb5828cefc510bd3b3 100644 --- a/core/modules/comment/src/CommentTypeForm.php +++ b/core/modules/comment/src/CommentTypeForm.php @@ -111,7 +111,7 @@ public function form(array $form, FormStateInterface $form_state) { '#default_value' => $comment_type->getTargetEntityTypeId(), '#title' => t('Target entity type'), '#options' => $options, - '#description' => t('The target entity type can not be changed after the comment type has been created.') + '#description' => t('The target entity type can not be changed after the comment type has been created.'), ]; } else { diff --git a/core/modules/comment/src/CommentViewsData.php b/core/modules/comment/src/CommentViewsData.php index ead61c1a33c467854d09049a1029e060c953c861..9a344a65be03c22b135c9198654de266ed4c29cc 100644 --- a/core/modules/comment/src/CommentViewsData.php +++ b/core/modules/comment/src/CommentViewsData.php @@ -214,7 +214,7 @@ public function getViewsData() { [ 'field' => 'entity_type', 'value' => $type, - 'table' => 'comment_field_data' + 'table' => 'comment_field_data', ], ], ], diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php index 03e95657e7c9fb55506d0cf43691c3ccab2e0406..7534df3183c81a7ad85a4d068496272f7a3663cd 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php @@ -31,7 +31,7 @@ protected function getCommentVariables() { $return['comment'] = [ 'comment_type' => 'comment', 'label' => $this->t('Default comments'), - 'description' => $this->t('Allows commenting on content') + 'description' => $this->t('Allows commenting on content'), ]; } else { @@ -39,7 +39,7 @@ protected function getCommentVariables() { $return['comment_no_subject'] = [ 'comment_type' => 'comment_no_subject', 'label' => $this->t('Comments without subject field'), - 'description' => $this->t('Allows commenting on content, comments without subject field') + 'description' => $this->t('Allows commenting on content, comments without subject field'), ]; } } diff --git a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php index f88c0498d3d0844876dc0355a6f872b6029856c8..b8200c1c7f7a3247b37084b37e324dc8d68d2de8 100644 --- a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php +++ b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php @@ -32,9 +32,9 @@ public function query() { [ 'field' => 'uid', 'operator' => '!=', - 'value' => '0' - ] - ] + 'value' => '0', + ], + ], ]; $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $definition); diff --git a/core/modules/comment/src/Tests/CommentPagerTest.php b/core/modules/comment/src/Tests/CommentPagerTest.php index 5bbf49c2b473a442af1678776ae3700fe3e53bf1..de45c86cdb1f8a6ba1acb6f4848892f257beb7f3 100644 --- a/core/modules/comment/src/Tests/CommentPagerTest.php +++ b/core/modules/comment/src/Tests/CommentPagerTest.php @@ -329,7 +329,7 @@ public function testTwoPagers() { 'settings' => [ 'pager_id' => 1, 'view_mode' => 'default', - ] + ], ]) ->save(); diff --git a/core/modules/comment/tests/src/Functional/CommentAdminTest.php b/core/modules/comment/tests/src/Functional/CommentAdminTest.php index 9e26be4f0880e76fb215f123143f8012a196b68a..2c8cb172e37ddd8aadb691614c7cc1487adc2782 100644 --- a/core/modules/comment/tests/src/Functional/CommentAdminTest.php +++ b/core/modules/comment/tests/src/Functional/CommentAdminTest.php @@ -57,7 +57,7 @@ public function testApprovalAdminInterface() { 'comment_body' => $body, 'entity_id' => $this->node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', ]); $this->drupalLogout(); @@ -145,7 +145,7 @@ public function testApprovalNodeInterface() { 'comment_body' => $body, 'entity_id' => $this->node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', ]); $this->drupalLogout(); diff --git a/core/modules/comment/tests/src/Functional/CommentCSSTest.php b/core/modules/comment/tests/src/Functional/CommentCSSTest.php index e17534a721cea6d8cb4ef254b08405b0c5a5e9fb..c281f63ce38c9422749a3bdbdcccf725319b62e0 100644 --- a/core/modules/comment/tests/src/Functional/CommentCSSTest.php +++ b/core/modules/comment/tests/src/Functional/CommentCSSTest.php @@ -23,7 +23,7 @@ protected function setUp() { // Allow anonymous users to see comments. user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, [ 'access comments', - 'access content' + 'access content', ]); } diff --git a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php index 7580bb20307ae3a25607cfaa4a4664a5632940fa..d404747844b5646951ad894a2f7b6c2216c587e1 100644 --- a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php +++ b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php @@ -253,7 +253,7 @@ public function getUnapprovedComment($subject) { */ public function testCommentFunctionality() { $limited_user = $this->drupalCreateUser([ - 'administer entity_test fields' + 'administer entity_test fields', ]); $this->drupalLogin($limited_user); // Test that default field exists. diff --git a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php index daac938fa3badbf1e47bccdd70cafe9043f62858..f6bec9c7d3548603ed52a218e589a266cbff4cf5 100644 --- a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php +++ b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php @@ -99,7 +99,7 @@ protected function createEntity($values, $langcode, $comment_type = 'comment_art $node = $this->drupalCreateNode([ 'type' => $node_type, $field_name => [ - ['status' => CommentItemInterface::OPEN] + ['status' => CommentItemInterface::OPEN], ], ]); $values['entity_id'] = $node->id(); diff --git a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php index 5cb9680514133a43eef071dda7c078c9927266b2..4085f4f47bf5e319f7d8c20215215501bd5f3dad 100644 --- a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php +++ b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php @@ -119,7 +119,7 @@ public function testBlockDisplay() { $map = [ 'subject' => 'subject', 'cid' => 'cid', - 'comment_field_data_created' => 'created' + 'comment_field_data_created' => 'created', ]; $expected_result = []; foreach (array_values($this->commentsCreated) as $key => $comment) { diff --git a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php index bb0724588993d54ece0986fad32748c6f3a970ad..c17f247dff0b6df2dd39fb8d3a97f1a1b582e0a3 100644 --- a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php @@ -202,7 +202,7 @@ public function testAccessToAdministrativeFields() { // Generate permutations. $combinations = [ 'comment' => [$comment1, $comment2, $comment3, $comment4], - 'user' => [$comment_admin_user, $comment_enabled_user, $comment_no_edit_user, $comment_disabled_user, $anonymous_user] + 'user' => [$comment_admin_user, $comment_enabled_user, $comment_no_edit_user, $comment_disabled_user, $anonymous_user], ]; $permutations = $this->generatePermutations($combinations); diff --git a/core/modules/comment/tests/src/Kernel/CommentValidationTest.php b/core/modules/comment/tests/src/Kernel/CommentValidationTest.php index 98b771513b97d609f8c3366ce2c5e66ce1437685..1d81d55ececacb41070009d7cc1e4ca78779960a 100644 --- a/core/modules/comment/tests/src/Kernel/CommentValidationTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentValidationTest.php @@ -51,7 +51,7 @@ public function testValidation() { 'type' => 'comment', 'settings' => [ 'comment_type' => 'comment', - ] + ], ])->save(); // Create a page node type. diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php index 2fb8c745706927de958c667152a738c67b51347c..2144ebd94aa5d61731ac5cd39ed3845dd75374ee 100644 --- a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php +++ b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php @@ -118,7 +118,7 @@ public function testUsername() { 'field' => 'name', 'id' => 'name', 'plugin_id' => 'field', - 'type' => 'comment_username' + 'type' => 'comment_username', ], 'subject' => [ 'table' => 'comment_field_data', diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php index c82467947af269d99ab7eeb4b9d1f6ad6de8192b..475c4a4a63796e925daf661bfcc58d55e5a71ecc 100644 --- a/core/modules/config/src/Form/ConfigSync.php +++ b/core/modules/config/src/Form/ConfigSync.php @@ -214,12 +214,12 @@ public function buildForm(array $form, FormStateInterface $form_state) { sort($change_list); $message = [ [ - '#markup' => $this->t('The following items in your active configuration have changes since the last import that may be lost on the next import.') + '#markup' => $this->t('The following items in your active configuration have changes since the last import that may be lost on the next import.'), ], [ '#theme' => 'item_list', '#items' => $change_list, - ] + ], ]; $this->messenger()->addWarning($this->renderer->renderPlain($message)); } @@ -295,7 +295,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 'class' => ['use-ajax'], 'data-dialog-type' => 'modal', 'data-dialog-options' => json_encode([ - 'width' => 700 + 'width' => 700, ]), ], ]; diff --git a/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php b/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php index 8d21ee4e832ddac86055abce6acee89e69517012..9d48e0b1b9618d72efdc298438a3db0244bc6490 100644 --- a/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php +++ b/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php @@ -18,7 +18,7 @@ public function loadOverrides($names) { return [ 'config_test.dynamic.test_1' => [ 'label' => 'Overridden label', - ] + ], ]; } diff --git a/core/modules/config/tests/config_events_test/src/EventSubscriber.php b/core/modules/config/tests/config_events_test/src/EventSubscriber.php index b36a0db7a18ca0b2d94539c7707d961bc8350272..0cdc4416c315a88051ec2484f9ec04a2e75d3ee4 100644 --- a/core/modules/config/tests/config_events_test/src/EventSubscriber.php +++ b/core/modules/config/tests/config_events_test/src/EventSubscriber.php @@ -40,7 +40,7 @@ public function configEventRecorder(ConfigCrudEvent $event, $name) { 'event_name' => $name, 'current_config_data' => $config->get(), 'original_config_data' => $config->getOriginal(), - 'raw_config_data' => $config->getRawData() + 'raw_config_data' => $config->getRawData(), ]); } diff --git a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php index 092ad2b377f808f60ea375ba6d0be594bc502100..c7e0b27d444832de8566d0d6b272ed573255258c 100644 --- a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php +++ b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php @@ -21,7 +21,7 @@ class ConfigLanguageOverrideWebTest extends BrowserTestBase { public static $modules = [ 'block', 'language', - 'system' + 'system', ]; /** diff --git a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php index 4170e250be255314ed404e1008c28c39f74cd413..69a7ed74ea2e158c9c987af983677e2dce4c5708 100644 --- a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php +++ b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php @@ -177,7 +177,7 @@ public function testImport() { // object. $this->assertRaw(t('Are you sure you want to update the %name @type?', [ '%name' => 'second', - '@type' => 'test configuration' + '@type' => 'test configuration', ])); $this->drupalPostForm(NULL, [], t('Confirm')); $entity = $storage->load('second'); diff --git a/core/modules/config_translation/src/ConfigEntityMapper.php b/core/modules/config_translation/src/ConfigEntityMapper.php index 2ae30959332d6e37ce67b87d377d6bcacebbd6bb..ab226a8754d8eb66b28d5123b44ac764c0a2c9c0 100644 --- a/core/modules/config_translation/src/ConfigEntityMapper.php +++ b/core/modules/config_translation/src/ConfigEntityMapper.php @@ -263,7 +263,7 @@ protected function processRoute(Route $route) { $parameters += [ $this->entityType => [ 'type' => 'entity:' . $this->entityType, - ] + ], ]; $route->setOption('parameters', $parameters); } diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php index 95af49eea92f79147345c67c75e5ad2f0b535452..7cbeb57746a73a87b7d6961503bb5732416f7cd0 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php @@ -15,7 +15,7 @@ class ConfigTranslationDateFormatUiTest extends BrowserTestBase { public static $modules = [ 'language', 'config_translation', - 'system' + 'system', ]; protected function setUp() { diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php index 20ee969b8e10cf11a645cb55bb81e98b0e078580..1d0116dc99973741160c60a13f45f9d28764d9a4 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php @@ -189,7 +189,7 @@ public function doCustomContentTypeListTest() { $block_content_type = BlockContentType::create([ 'id' => mb_strtolower($this->randomMachineName(16)), 'label' => $this->randomMachineName(), - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); @@ -395,7 +395,7 @@ public function doFieldListTest() { $block_content_type = BlockContentType::create([ 'id' => 'basic', 'label' => 'Basic', - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); $field = FieldConfig::create([ diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php index 84faaec66bb68030a1a0ef22be8711f0f32c123d..64fde483e0086589b1f4e52a6dade74af6641998 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php @@ -907,7 +907,7 @@ public function testSequenceTranslation() { $expected = [ 'kitten', 'llama', - 'elephant' + 'elephant', ]; $actual = $config_factory ->getEditable('config_translation_test.content') diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php index b783accf9761e534c19f4189f6475bd0f4542069..c13a1b73f235ccba9287388f9ac4fe282aba6898 100644 --- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php @@ -42,8 +42,8 @@ public function providerSource() { 'lid' => 11, 'objectid' => 'profile_love_migrations', 'type' => 'field', - 'property' => 'explanation' - ] + 'property' => 'explanation', + ], ], 'locales_target' => [ [ diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php index 02cdd9909c3785ca5d88d6a117ed9882e2dab53d..3eb5880ed7c8ecd3426c20752a8a9ad64af34c24 100644 --- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php @@ -41,8 +41,8 @@ public function providerSource() { 'lid' => 11, 'objectid' => 'profile_love_migrations', 'type' => 'field', - 'property' => 'explanation' - ] + 'property' => 'explanation', + ], ], 'locales_target' => [ [ diff --git a/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php b/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php index e72c61f6dc14e8d14096fb4f5eda7840d43d9f78..4315f81b2d1efa8469d502a95d7202cf79dcfe64 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php @@ -118,7 +118,7 @@ public function providerTestHasTranslatable() { $this->getElement(['iii' => 'jjj']), ]), ]), - FALSE + FALSE, ], [ $this->getNestedElement([ diff --git a/core/modules/contact/tests/drupal-7.contact.database.php b/core/modules/contact/tests/drupal-7.contact.database.php index bd36384d7ea973011c490c05fb22b97bb68c6245..e63ee29d169e9457130ef9cbb1f1c405f2c38913 100644 --- a/core/modules/contact/tests/drupal-7.contact.database.php +++ b/core/modules/contact/tests/drupal-7.contact.database.php @@ -21,7 +21,7 @@ 'recipients', 'reply', 'weight', - 'selected' + 'selected', ]) ->values([ 'category' => 'Upgrade test', diff --git a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php index 747b8e62e01be88c0122e40fe96c961f09e82733..2a406eb8de31d104d7d3527f6a63bc571cf26b30 100644 --- a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php +++ b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php @@ -98,7 +98,7 @@ public function testSendPersonalContactMessage() { $placeholders = [ '@sender_name' => $this->webUser->username, '@sender_email' => $this->webUser->getEmail(), - '@recipient_name' => $this->contactUser->getUsername() + '@recipient_name' => $this->contactUser->getUsername(), ]; $this->assertRaw(new FormattableMarkup('@sender_name (@sender_email) sent @recipient_name an email.', $placeholders)); // Ensure an unescaped version of the email does not exist anywhere. diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php index b42b96064623766110e85e80070a1b8018f897fb..2c881b01806c6d1171b5e18644d08ae28b141156 100644 --- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php +++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php @@ -100,7 +100,7 @@ public function testSiteWideContact() { // field_ui enabled admin/structure/contact/manage/personal/fields exists. // @todo: See https://www.drupal.org/node/2031223 for the above. $edit_link = $this->xpath('//a[@href=:href]', [ - ':href' => \Drupal::url('entity.contact_form.edit_form', ['contact_form' => 'personal']) + ':href' => \Drupal::url('entity.contact_form.edit_form', ['contact_form' => 'personal']), ]); $this->assertTrue(empty($edit_link), format_string('No link containing href %href found.', ['%href' => 'admin/structure/contact/manage/personal'] @@ -405,7 +405,7 @@ public function testAutoReply() { 'administer contact forms', 'administer permissions', 'administer users', - 'access site reports' + 'access site reports', ]); $this->drupalLogin($admin_user); diff --git a/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php b/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php index c66b5ad5d4cbc20d3d6f99d8575d79261e4d7697..fd9b1ce8db81012378ed0904c5aa1a3af5eeab3d 100644 --- a/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php +++ b/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php @@ -34,7 +34,7 @@ protected function setUp($import_test_views = TRUE) { $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => strtolower($this->randomMachineName()), 'entity_type' => 'contact_message', - 'type' => 'text' + 'type' => 'text', ]); $this->fieldStorage->save(); diff --git a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php index 72ea7f269498d2be30983203ddd0bdcedd2a0409..6d6afa36d3e4185e3c0da8c535f42a249f7320b3 100644 --- a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php +++ b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php @@ -37,7 +37,7 @@ public function providerSource() { 'reply' => '', 'weight' => '0', 'selected' => '1', - ] + ], ]; $tests[0]['expected_data'] = [ [ diff --git a/core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php b/core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php index 6006c9abcbb491f50c4efc6a7214d2c5c5da81c2..274b9f8e3784fa8b1d41d47fc7cda3d51e4c73db 100644 --- a/core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php +++ b/core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php @@ -68,7 +68,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta $header = [ 'type' => $this->t('Items'), - 'operations' => $this->t('Operations') + 'operations' => $this->t('Operations'), ]; $form['entity_types_container'] = [ '#type' => 'details', @@ -108,7 +108,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta 'label' => $this->t('@bundle types', ['@bundle' => $entity_type->getLabel()]), 'entity_type_id' => $entity_type->id(), 'selected_bundles' => $selected_bundles_list, - ] + ], ], 'operations' => [ '#type' => 'operations', diff --git a/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php b/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php index 4b879737dae519ed5fb2bb89cea0da772d2824bf..65fc2a0c509a1110375c53d5241e21f1eeb73a79 100644 --- a/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php +++ b/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php @@ -98,7 +98,7 @@ public function validate($value, Constraint $constraint) { if (!$original_state->canTransitionTo($new_state->id())) { $this->context->addViolation($constraint->message, [ '%from' => $original_state->label(), - '%to' => $new_state->label() + '%to' => $new_state->label(), ]); } } diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php index 76d25f2c85f526beecb96212f486233811dc52fc..6b2af349779a89efc18de9dace1af92918f8d7e7 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php @@ -473,7 +473,7 @@ public function testWorkflowInUse() { 'edit own moderated_content content', 'use editorial transition create_new_draft', 'use editorial transition publish', - 'use editorial transition archive' + 'use editorial transition archive', ]); $this->drupalLogin($user); $paths = [ diff --git a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php index e5b296d7f45ab50fe5b2529bd4661d668798f42d..175554f89903e6765c6b97c9821576be8f21f2ea 100644 --- a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php @@ -201,11 +201,11 @@ public function providerTestWorkflowChanges() { return [ 'view on base table, filter on base table' => [ 'test_content_moderation_state_filter_base_table', - 'Content: Moderation state' + 'Content: Moderation state', ], 'view on base table, filter on revision table' => [ 'test_content_moderation_state_filter_base_table_filter_on_revision', - 'Content revision: Moderation state' + 'Content revision: Moderation state', ], ]; } diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php index f17e4ac83c6eecf35e2cd50c49581cd72c13cb5c..b2abed2b01d0a87aec98c3fa5d3478b42f6ebb03 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php @@ -89,7 +89,7 @@ public function permissionsTestCases() { ], ], ], - [] + [], ], ]; } diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php index ef63472146a2ca337370081803a6029522b58f21..279d4b4e6f75fdd2ee18586366f55f1de7ed4593 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php @@ -520,7 +520,7 @@ public function testWorkflowDependencies() { $this->assertEquals([ 'entity_test_no_bundle', 'entity_test_rev', - 'node' + 'node', ], $workflow->getTypePlugin()->getEntityTypes()); // Delete the node type and ensure it is removed from the workflow. diff --git a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php index e043656deacfe523bcab3d5a0ca79d925af36f5c..d59bfca036236ee887646230cde194aa06d0cb79 100644 --- a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php +++ b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php @@ -78,7 +78,7 @@ public function setLatestRevisionFlagTestCases() { ], 'Entity parameter on an entity form' => [ [ - '_entity_form' => 'entity_test_rev.edit' + '_entity_form' => 'entity_test_rev.edit', ], [ 'entity_test_rev' => [ @@ -94,7 +94,7 @@ public function setLatestRevisionFlagTestCases() { ], 'Entity form with no operation' => [ [ - '_entity_form' => 'entity_test_rev' + '_entity_form' => 'entity_test_rev', ], [ 'entity_test_rev' => [ @@ -110,7 +110,7 @@ public function setLatestRevisionFlagTestCases() { ], 'Non-moderated entity form' => [ [ - '_entity_form' => 'entity_test_mulrev' + '_entity_form' => 'entity_test_mulrev', ], [ 'entity_test_mulrev' => [ @@ -120,7 +120,7 @@ public function setLatestRevisionFlagTestCases() { ], 'Multiple entity parameters on an entity form' => [ [ - '_entity_form' => 'entity_test_rev.edit' + '_entity_form' => 'entity_test_rev.edit', ], [ 'entity_test_rev' => [ @@ -142,7 +142,7 @@ public function setLatestRevisionFlagTestCases() { ], 'Overridden load_latest_revision flag does not change' => [ [ - '_entity_form' => 'entity_test_rev.edit' + '_entity_form' => 'entity_test_rev.edit', ], [ 'entity_test_rev' => [ @@ -153,7 +153,7 @@ public function setLatestRevisionFlagTestCases() { ], 'Non-revisionable entity type will not change' => [ [ - '_entity_form' => 'entity_test.edit' + '_entity_form' => 'entity_test.edit', ], [ 'entity_test' => [ @@ -165,7 +165,7 @@ public function setLatestRevisionFlagTestCases() { ], 'Overridden load_latest_revision flag does not change with multiple parameters' => [ [ - '_entity_form' => 'entity_test_rev.edit' + '_entity_form' => 'entity_test_rev.edit', ], [ 'entity_test_rev' => [ diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc index 998359d9ddb9ca34df4a584777b775fbde4783e6..a75470211c53b8a934a2d7f7eb7ee687c5e83086 100644 --- a/core/modules/content_translation/content_translation.admin.inc +++ b/core/modules/content_translation/content_translation.admin.inc @@ -65,7 +65,7 @@ function content_translation_field_sync_widget(FieldDefinitionInterface $field, // does not get lost. $element[key($options)]['#attached']['drupalSettings']['contentTranslationDependentOptions'] = [ 'dependent_selectors' => [ - $element_name => $require_all_groups_for_translation + $element_name => $require_all_groups_for_translation, ], ]; $element[key($options)]['#attached']['library'][] = 'content_translation/drupal.content_translation.admin'; diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install index 93a9968221147bb69c0b981d3b4381ecf4933035..bc948e1a3aea5a75f1c8a0baebb3060f33b81cd4 100644 --- a/core/modules/content_translation/content_translation.install +++ b/core/modules/content_translation/content_translation.install @@ -20,14 +20,14 @@ function content_translation_install() { // Translation works when at least two languages are added. if (count(\Drupal::languageManager()->getLanguages()) < 2) { $t_args = [ - ':language_url' => Url::fromRoute('entity.configurable_language.collection')->toString() + ':language_url' => Url::fromRoute('entity.configurable_language.collection')->toString(), ]; $message = t('This site has only a single language enabled. Add at least one more language in order to translate content.', $t_args); \Drupal::messenger()->addWarning($message); } // Point the user to the content translation settings. $t_args = [ - ':settings_url' => Url::fromRoute('language.content_settings_page')->toString() + ':settings_url' => Url::fromRoute('language.content_settings_page')->toString(), ]; $message = t('Enable translation for content types, taxonomy vocabularies, accounts, or any other element you wish to translate.', $t_args); \Drupal::messenger()->addWarning($message); diff --git a/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php b/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php index 8cb3a4ff4e82b0624471557901e26e3f0c42ec50..ae833955dbefd709742f8c27d44e7cdd050654d3 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php @@ -112,7 +112,7 @@ protected function doTestBasicTranslation() { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $this->drupalPostForm($add_url, $this->getEditValues($values, $langcode), $this->getFormSubmitActionForNewTranslation($entity, $langcode)); @@ -176,7 +176,7 @@ protected function doTestBasicTranslation() { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); // This does not save anything, it merely reloads the form and fills in the // fields with the values from the different source language. @@ -190,7 +190,7 @@ protected function doTestBasicTranslation() { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $source_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $this->drupalPostForm($add_url, $edit, $this->getFormSubmitActionForNewTranslation($entity, $langcode)); $storage->resetCache([$this->entityId]); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php index 6d42a1a0fa68633c07221fc4010348a1e9a6fdb1..1bf836aaca8769fac179c05ee79da586901f0bc3 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php @@ -140,7 +140,7 @@ public function testTitleDoesNotChangesOnChangingLanguageWidgetAndTriggeringAjax $this->assertRaw('Edit Article english_title | Drupal'); $edit = [ 'langcode[0][value]' => 'en', - 'field_image_field[0][alt]' => 'alternative_text' + 'field_image_field[0][alt]' => 'alternative_text', ]; $this->drupalPostForm(NULL, $edit, t('Save (this translation)')); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php index f15a8f9bc8d11a5fdf517567863e3e73cd1eec86..52a92300078a57924e46618398ae3307ee629361 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php @@ -154,7 +154,7 @@ public function testSettingsUI() { 'settings[node][article][settings][language][langcode]' => 'current_interface', 'settings[node][article][settings][language][language_alterable]' => TRUE, 'settings[node][article][translatable]' => TRUE, - 'settings[node][article][fields][title]' => TRUE + 'settings[node][article][fields][title]' => TRUE, ]; $this->assertSettings('node', NULL, TRUE, $edit); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php index 77c176e78e884e07c09931f34cae357ad0831dbf..97d0b00f5da6a01a6b5dccb5ed7d21282432a5fd 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php @@ -25,7 +25,7 @@ public function testUICheckSkip() { $admin_user = $this->drupalCreateUser([ 'translate any entity', 'administer content translation', - 'administer languages' + 'administer languages', ]); $this->drupalLogin($admin_user); // Visit the content translation. diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php index bfa93dc8e23c5debeb9beb6775d8c1fa4ea8441c..7e7bf1f84b0f9da2f190344dc741db9654dc9b20 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php @@ -109,7 +109,7 @@ protected function doTestBasicTranslation() { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $this->drupalPostForm($add_url, $this->getEditValues($values, $langcode), $this->getFormSubmitActionForNewTranslation($entity, $langcode)); @@ -173,7 +173,7 @@ protected function doTestBasicTranslation() { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); // This does not save anything, it merely reloads the form and fills in the // fields with the values from the different source language. @@ -187,7 +187,7 @@ protected function doTestBasicTranslation() { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $source_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $this->drupalPostForm($add_url, $edit, $this->getFormSubmitActionForNewTranslation($entity, $langcode)); $storage->resetCache([$this->entityId]); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php index b44919aa4f18bddb9c4ee26499800b39387e6dd5..ab70fef920ac2572ff15a23a5ed0e3e0a0bd4c63 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php @@ -59,7 +59,7 @@ public function testHiddenWidgets() { $add_url = Url::fromRoute("entity.{$this->entityTypeId}.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => 'en', - 'target' => 'it' + 'target' => 'it', ]); $this->drupalGet($add_url); $this->assertNotEmpty($this->xpath($field_xpath)); diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php index b8776a26a1b1733909f35bc324cc8456de65ca78..44e816089ec1db2bf8dc335e4274940c17a95267 100644 --- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php +++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php @@ -74,7 +74,7 @@ public function testConfigImportUpdates() { 'langcode' => 'en', 'status' => TRUE, 'dependencies' => [ - 'module' => ['content_translation'] + 'module' => ['content_translation'], ], 'id' => $config_id, 'target_entity_type_id' => 'entity_test_mul', diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index a814c391f110e04a2d1549d40470c0db08b331fa..b9d61b76d2e732ce93fad1ee5756cfc1c94a8535 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -86,7 +86,7 @@ function contextual_help($route_name, RouteMatchInterface $route_match) { $sample_picture = [ '#theme' => 'image', '#uri' => 'core/misc/icons/bebebe/pencil.svg', - '#alt' => t('contextual links button') + '#alt' => t('contextual links button'), ]; $sample_picture = \Drupal::service('renderer')->render($sample_picture); $output .= '

  • ' . t('Hovering over the area of interest will temporarily make the contextual links button visible (which looks like a pencil in most themes, and is normally displayed in the upper right corner of the area). The icon typically looks like this: @picture', ['@picture' => $sample_picture]) . '
  • '; diff --git a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php index de30f5c424715059ff065ecf83ba0efbd52688bf..338d5d704fce311a37ba754abf87fd37b96b4547 100644 --- a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php +++ b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php @@ -130,8 +130,8 @@ public function render(ResultRow $values) { [], [ 'contextual-views-field-links' => UrlHelper::encodePath(Json::encode($links)), - ] - ] + ], + ], ]; $element = [ diff --git a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php index f42bf20f80d5071a514ddbb6b06980e32b70e1fa..0e5f721375fc04495e6cc8985c7ee81997245a4b 100644 --- a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php +++ b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php @@ -65,7 +65,7 @@ public function _contextual_links_id_testcases() { 'links' => [ 'views_ui_edit' => [ 'route_parameters' => [ - 'view' => 'frontpage' + 'view' => 'frontpage', ], 'metadata' => [ 'location' => 'page', diff --git a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php index c0c66b7ca10dc78c770517ab19b384ca2bf6d0c9..2af64d7bb9eeb0503ad5a62d8945bf107feeeb8b 100644 --- a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php +++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php @@ -51,9 +51,9 @@ public function defaultValuesForm(array &$form, FormStateInterface $form_state) '#states' => [ 'visible' => [ ':input[id="edit-default-value-input-default-date-type"]' => ['value' => static::DEFAULT_VALUE_CUSTOM], - ] - ] - ] + ], + ], + ], ]; return $element; @@ -112,7 +112,7 @@ public static function processDefaultValue($default_value, FieldableEntityInterf [ 'value' => $value, 'date' => $date, - ] + ], ]; } return $default_value; diff --git a/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php b/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php index 854352eb5bd2b4767b9ebd62103368c9027e5ed5..a89687ad151ce955d7802911f30e9da43f80887c 100644 --- a/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php +++ b/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php @@ -49,7 +49,7 @@ protected function setUp($import_test_views = TRUE) { // Add a date field to page nodes. $node_type = NodeType::create([ 'type' => 'page', - 'name' => 'page' + 'name' => 'page', ]); $node_type->save(); $fieldStorage = FieldStorageConfig::create([ diff --git a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php index 72ef1283198ab457ea0e14990081792601aa16b4..89a7605df3ba12ae72be73eea7cd696c1449a3e2 100644 --- a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php +++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php @@ -189,7 +189,7 @@ public function testDateField() { ->setComponent($field_name, $this->displayOptions) ->save(); $expected = new FormattableMarkup($this->displayOptions['settings']['past_format'], [ - '@interval' => $this->dateFormatter->formatTimeDiffSince($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]) + '@interval' => $this->dateFormatter->formatTimeDiffSince($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]), ]); $output = $this->renderTestEntity($id); $this->assertContains((string) $expected, $output, new FormattableMarkup('Formatted date field using datetime_time_ago format displayed as %expected in %timezone.', [ @@ -213,7 +213,7 @@ public function testDateField() { ->setComponent($field_name, $this->displayOptions) ->save(); $expected = new FormattableMarkup($this->displayOptions['settings']['future_format'], [ - '@interval' => $this->dateFormatter->formatTimeDiffUntil($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]) + '@interval' => $this->dateFormatter->formatTimeDiffUntil($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]), ]); $output = $this->renderTestEntity($id); $this->assertContains((string) $expected, $output, new FormattableMarkup('Formatted date field using datetime_time_ago format displayed as %expected in %timezone.', [ @@ -341,7 +341,7 @@ public function testDatetimeField() { ->setComponent($field_name, $this->displayOptions) ->save(); $expected = new FormattableMarkup($this->displayOptions['settings']['past_format'], [ - '@interval' => $this->dateFormatter->formatTimeDiffSince($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]) + '@interval' => $this->dateFormatter->formatTimeDiffSince($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]), ]); $output = $this->renderTestEntity($id); $this->assertContains((string) $expected, $output, new FormattableMarkup('Formatted date field using datetime_time_ago format displayed as %expected.', ['%expected' => $expected])); @@ -362,7 +362,7 @@ public function testDatetimeField() { ->setComponent($field_name, $this->displayOptions) ->save(); $expected = new FormattableMarkup($this->displayOptions['settings']['future_format'], [ - '@interval' => $this->dateFormatter->formatTimeDiffUntil($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]) + '@interval' => $this->dateFormatter->formatTimeDiffUntil($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]), ]); $output = $this->renderTestEntity($id); $this->assertContains((string) $expected, $output, new FormattableMarkup('Formatted date field using datetime_time_ago format displayed as %expected.', ['%expected' => $expected])); diff --git a/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php index 8261b27793f8555c3069110cf681c3bbf4426ca0..f9b8c5c88671eb9152634b0b211cd8ce335f7d71 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php @@ -38,7 +38,7 @@ protected function setUp($import_test_views = TRUE) { 'type' => 'page', 'field_date' => [ 'value' => $date, - ] + ], ]); $node->save(); $this->nodes[] = $node; diff --git a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php index de236c9080ce48aeeed1964703d849f0e793ecde..590355164178c9bfb2523450c455e0b585f887b4 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php +++ b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php @@ -57,7 +57,7 @@ protected function setUp($import_test_views = TRUE) { // Add a date field to page nodes. $node_type = NodeType::create([ 'type' => 'page', - 'name' => 'page' + 'name' => 'page', ]); $node_type->save(); $fieldStorage = FieldStorageConfig::create([ diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php index 7cb0fa040ab8c04651129e2c8e08a753febc84cf..1e6369cd2400256ccdd6ca5807fec932c15c41c5 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php @@ -59,7 +59,7 @@ protected function setUp($import_test_views = TRUE) { 'type' => 'page', 'field_date' => [ 'value' => $date, - ] + ], ]); $node->save(); $this->nodes[] = $node; diff --git a/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php index 7375c4db29e26997b1709a44f836f432c48c1d42..16e888abee1c95b228bd5eeb6ec8794ec7289145 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php @@ -39,7 +39,7 @@ protected function setUp($import_test_views = TRUE) { 'type' => 'page', 'field_date' => [ 'value' => $date, - ] + ], ]); $node->save(); $this->nodes[] = $node; diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module index 700ceeaa6bdcea2d2c35136c7f08089a9b7a95e7..bc04ce8fe4ebc6df930fb850d52ea8c7d32aa0d6 100644 --- a/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module @@ -103,7 +103,7 @@ function dblog_form_system_logging_settings_alter(&$form, FormStateInterface $fo '#title' => t('Database log messages to keep'), '#default_value' => \Drupal::configFactory()->getEditable('dblog.settings')->get('row_limit'), '#options' => [0 => t('All')] + array_combine($row_limits, $row_limits), - '#description' => t('The maximum number of messages to keep in the database log. Requires a cron maintenance task.', [':cron' => \Drupal::url('system.status')]) + '#description' => t('The maximum number of messages to keep in the database log. Requires a cron maintenance task.', [':cron' => \Drupal::url('system.status')]), ]; $form['#submit'][] = 'dblog_logging_settings_submit'; diff --git a/core/modules/editor/src/Tests/EditorLoadingTest.php b/core/modules/editor/src/Tests/EditorLoadingTest.php index b8dd074d499f2f400b903d13500dc9daa96d1049..dca641ae0cd3514afb01bef63aa5fdb8a741c388 100644 --- a/core/modules/editor/src/Tests/EditorLoadingTest.php +++ b/core/modules/editor/src/Tests/EditorLoadingTest.php @@ -118,7 +118,7 @@ public function testLoading() { 'directory' => 'inline-images', 'max_size' => '', 'max_dimensions' => ['width' => '', 'height' => ''], - ] + ], ]); $editor->save(); @@ -202,7 +202,7 @@ public function testLoading() { $this->drupalCreateNode([ 'type' => 'article', 'body' => [ - ['value' => $this->randomMachineName(32), 'format' => 'full_html'] + ['value' => $this->randomMachineName(32), 'format' => 'full_html'], ], ]); @@ -234,7 +234,7 @@ public function testSupportedElementTypes() { 'directory' => 'inline-images', 'max_size' => '', 'max_dimensions' => ['width' => '', 'height' => ''], - ] + ], ]); $editor->save(); @@ -242,7 +242,7 @@ public function testSupportedElementTypes() { $this->drupalCreateNode([ 'type' => 'page', 'field_text' => [ - ['value' => $this->randomMachineName(32), 'format' => 'full_html'] + ['value' => $this->randomMachineName(32), 'format' => 'full_html'], ], ]); diff --git a/core/modules/editor/src/Tests/EditorSecurityTest.php b/core/modules/editor/src/Tests/EditorSecurityTest.php index f3c2995b40595fdcf9f101735a82f080cf5ca355..a5ea925af6e45bd85e28452f4588c871c1fbea29 100644 --- a/core/modules/editor/src/Tests/EditorSecurityTest.php +++ b/core/modules/editor/src/Tests/EditorSecurityTest.php @@ -93,7 +93,7 @@ protected function setUp() { 'status' => 1, 'settings' => [ 'allowed_html' => '


    ', - ] + ], ], ], ]); @@ -108,7 +108,7 @@ protected function setUp() { 'status' => 1, 'settings' => [ 'allowed_html' => '


    ', - ] + ], ], ], ]); @@ -128,7 +128,7 @@ protected function setUp() { 'status' => 1, 'settings' => [ 'allowed_html' => '


    ', - ] + ], ], ], ]); @@ -209,9 +209,9 @@ protected function setUp() { $this->drupalCreateNode([ 'type' => 'article', 'body' => [ - ['value' => self::$sampleContent, 'format' => $sample['format']] + ['value' => self::$sampleContent, 'format' => $sample['format']], ], - 'uid' => $sample['author'] + 'uid' => $sample['author'], ]); } } diff --git a/core/modules/editor/src/Tests/EditorUploadImageScaleTest.php b/core/modules/editor/src/Tests/EditorUploadImageScaleTest.php index 100fb4fdc54e01c3edb1d0d79188a16edba0f244..a4a22339dedb8d34f6907e0c4330f8b0ceb17dcc 100644 --- a/core/modules/editor/src/Tests/EditorUploadImageScaleTest.php +++ b/core/modules/editor/src/Tests/EditorUploadImageScaleTest.php @@ -51,9 +51,9 @@ protected function setUp() { 'max_size' => '', 'max_dimensions' => [ 'width' => NULL, - 'height' => NULL + 'height' => NULL, ], - ] + ], ])->save(); // Create admin user. diff --git a/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php b/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php index a4515d567300f79313c567c5fefb255e538f771e..5496378eaa3fbacfad4ac717ede25352c08d707b 100644 --- a/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php +++ b/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php @@ -57,8 +57,8 @@ protected function setUp() { 0 => [ 'value' => '

    Do you also love Drupal?

    ', 'format' => 'filtered_html', - ] - ] + ], + ], ]); } @@ -73,7 +73,7 @@ public function testUsersWithoutPermission() { $users = [ $this->drupalCreateUser(static::$basicPermissions), $this->drupalCreateUser(array_merge(static::$basicPermissions, ['edit any article content'])), - $this->drupalCreateUser(array_merge(static::$basicPermissions, ['access in-place editing'])) + $this->drupalCreateUser(array_merge(static::$basicPermissions, ['access in-place editing'])), ]; // Now test with each of the 3 users with insufficient permissions. diff --git a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php index 276f55922557a0648f3046319d5479e7611f2f75..16c0773e7c94345a12ee3ef796459b60b3b7c6bd 100644 --- a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php +++ b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php @@ -221,7 +221,7 @@ public function testGetUntransformedTextCommand() { [ 'command' => 'editorGetUntransformedText', 'data' => 'Test', - ] + ], ]; $ajax_response_attachments_processor = \Drupal::service('ajax_response.attachments_processor'); diff --git a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php index 35820a093b6d1ec14b17f8bc0cf0cf2fb465dee9..40a43fbef206e1837c4bc7edaf1eb8471fb11c09 100644 --- a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php +++ b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php @@ -583,20 +583,20 @@ public function providerTestBlackListMode() { 'Pink Fairy Armadillo

    ', ], ], - ] + ], ]); $crazy_format->save(); @@ -183,10 +183,10 @@ public function testFilterFormatAPI() { 'a' => ['href' => TRUE], 'em' => TRUE, ], - ] + ], ], ], - ] + ], ]); $very_restricted_html_format->save(); $this->assertIdentical( @@ -220,7 +220,7 @@ public function testFilterFormatAPI() { 'allowed_html' => ' ', ], ], - ] + ], ]); $nonsensical_restricted_html->save(); $this->assertIdentical( @@ -416,7 +416,7 @@ public function testFilterFormatPreSave() { 'allowed_html' => '

    ', ], ], - ] + ], ]); $crazy_format->save(); // Use config to directly load the configuration and check that only enabled diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php index 1838cfea79f4393fcfb8fc6b9448179f27f19aae..b8626aedae4268c6911f9eb473d5a7f956aaa67a 100644 --- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php @@ -195,7 +195,7 @@ public function testCaptionFilter() { 'allowed_html' => '', 'filter_html_help' => 1, 'filter_html_nofollow' => 0, - ] + ], ]); $test_with_html_filter = function ($input) use ($filter, $html_filter, $renderer) { return $renderer->executeInRenderContext(new RenderContext(), function () use ($input, $filter, $html_filter) { @@ -410,7 +410,7 @@ public function testHtmlFilter() { 'allowed_html' => '


      1. ', 'filter_html_help' => 1, 'filter_html_nofollow' => 0, - ] + ], ]); // HTML filter is not able to secure some tags, these should never be @@ -465,7 +465,7 @@ public function testHtmlFilter() { 'allowed_html' => '

          1. ', 'filter_html_help' => 1, 'filter_html_nofollow' => 0, - ] + ], ]); $f = (string) $filter->process('
            link', Language::LANGCODE_NOT_SPECIFIED); $this->assertNormalized($f, 'link', 'HTML filter keeps explicitly allowed attributes, and removes attributes that are not explicitly allowed.'); @@ -477,7 +477,7 @@ public function testHtmlFilter() { 'allowed_html' => '

              1. ', 'filter_html_help' => 1, 'filter_html_nofollow' => 0, - ] + ], ]); $f = (string) $filter->process('
                link', Language::LANGCODE_NOT_SPECIFIED); $this->assertIdentical($f, 'link', 'HTML filter removes allowed attributes that do not have an explicitly allowed value.'); @@ -500,7 +500,7 @@ public function testNoFollowFilter() { 'allowed_html' => '', 'filter_html_help' => 1, 'filter_html_nofollow' => 1, - ] + ], ]); // Test if the rel="nofollow" attribute is added, even if we try to prevent @@ -548,7 +548,7 @@ public function testUrlFilter() { $filter->setConfiguration([ 'settings' => [ 'filter_url_length' => 496, - ] + ], ]); // @todo Possible categories: @@ -841,7 +841,7 @@ public function testUrlFilter() { $filter->setConfiguration([ 'settings' => [ 'filter_url_length' => 20, - ] + ], ]); $tests = [ 'www.trimmed.com/d/ff.ext?a=1&b=2#a1' => [ @@ -923,7 +923,7 @@ public function testUrlFilterContent() { $filter->setConfiguration([ 'settings' => [ 'filter_url_length' => 496, - ] + ], ]); $path = __DIR__ . '/../..'; diff --git a/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php b/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php index 85de742eb648960dd27c9ee32f28824e6b9c47c1..65a8357942cf6be85e6b16aa920e19343e790c44 100644 --- a/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php +++ b/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php @@ -157,7 +157,7 @@ public function testValidateNoMatchingFormats() { ]); $expected = [ - 'Provides a filter plugin that is in use in the following filter formats: Filter Format 1 Label, Filter Format 2 Label' + 'Provides a filter plugin that is in use in the following filter formats: Filter Format 1 Label, Filter Format 2 Label', ]; $reasons = $this->filterUninstallValidator->validate($this->randomMachineName()); $this->assertSame($expected, $this->castSafeStrings($reasons)); diff --git a/core/modules/forum/forum.views.inc b/core/modules/forum/forum.views.inc index 156596234bf44da6cfea1d59f5c1c1ba8dee55ac..1058153067c41956154f655ca6a18383ea1cf559 100644 --- a/core/modules/forum/forum.views.inc +++ b/core/modules/forum/forum.views.inc @@ -93,7 +93,7 @@ function forum_views_data() { 'id' => 'date', ], 'sort' => [ - 'id' => 'date' + 'id' => 'date', ], 'filter' => [ 'id' => 'date', diff --git a/core/modules/forum/src/Form/Overview.php b/core/modules/forum/src/Form/Overview.php index efc92664181853c78fb25d0a4ceda1a9d550e126..27335d61d9e2de85c463cdcf920bb6e59c83896a 100644 --- a/core/modules/forum/src/Form/Overview.php +++ b/core/modules/forum/src/Form/Overview.php @@ -94,7 +94,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular // Use the existing taxonomy overview submit handler. $form['terms']['#empty'] = $this->t('No containers or forums available. Add container or Add forum.', [ ':container' => $this->url('forum.add_container'), - ':forum' => $this->url('forum.add_forum') + ':forum' => $this->url('forum.add_forum'), ]); return $form; } diff --git a/core/modules/forum/src/ForumManager.php b/core/modules/forum/src/ForumManager.php index 05cd86076070b3955cf54122acd247a2b0d8caaf..1ecd3b68fa30760f886455a5c746e226bca8995d 100644 --- a/core/modules/forum/src/ForumManager.php +++ b/core/modules/forum/src/ForumManager.php @@ -184,7 +184,7 @@ public function getTopics($tid, AccountInterface $account) { 'cid', 'last_comment_uid', 'last_comment_timestamp', - 'comment_count' + 'comment_count', ]); $query->join('forum_index', 'f', 'f.nid = n.nid'); @@ -435,7 +435,7 @@ public function getIndex() { 'container' => 1, 'parents' => [], 'isIndex' => TRUE, - 'vid' => $vid + 'vid' => $vid, ]); // Load the tree below. diff --git a/core/modules/forum/src/ForumSettingsForm.php b/core/modules/forum/src/ForumSettingsForm.php index f017f21b3962d642a622d20aed94a75cf9f664a7..87a13bef7b587ad33a9ba4690e7c86102a6b5b5f 100644 --- a/core/modules/forum/src/ForumSettingsForm.php +++ b/core/modules/forum/src/ForumSettingsForm.php @@ -52,7 +52,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 1 => $this->t('Date - newest first'), 2 => $this->t('Date - oldest first'), 3 => $this->t('Posts - most active first'), - 4 => $this->t('Posts - least active first') + 4 => $this->t('Posts - least active first'), ]; $form['forum_order'] = [ '#type' => 'radios', diff --git a/core/modules/forum/src/ForumUninstallValidator.php b/core/modules/forum/src/ForumUninstallValidator.php index 8ee0310fe9054ba5cfede34afa6a3dadbe2b9bfa..24ae880264a78d1830fa7658adbc037fd2a68b4c 100644 --- a/core/modules/forum/src/ForumUninstallValidator.php +++ b/core/modules/forum/src/ForumUninstallValidator.php @@ -67,7 +67,7 @@ public function validate($module) { } else { $reasons[] = $this->t('To uninstall Forum, first delete all %vocabulary terms', [ - '%vocabulary' => $vocabulary->label() + '%vocabulary' => $vocabulary->label(), ]); } } diff --git a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php index 4114db5efc16995f0b04196fb505105b6aa99180..992500e1f9d5a0242d1a0a464852c86bc5170156 100644 --- a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php +++ b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php @@ -71,17 +71,17 @@ public function testForumIntegration() { $expected_result[] = [ 'nid' => $nodes[0]->id(), 'sticky' => NodeInterface::STICKY, - 'comment_count' => 1. + 'comment_count' => 1., ]; $expected_result[] = [ 'nid' => $nodes[1]->id(), 'sticky' => NodeInterface::NOT_STICKY, - 'comment_count' => 2. + 'comment_count' => 2., ]; $expected_result[] = [ 'nid' => $nodes[2]->id(), 'sticky' => NodeInterface::NOT_STICKY, - 'comment_count' => 3. + 'comment_count' => 3., ]; $column_map = [ 'nid' => 'nid', diff --git a/core/modules/hal/tests/fixtures/update/drupal-8.rest-hal_update_8301.php b/core/modules/hal/tests/fixtures/update/drupal-8.rest-hal_update_8301.php index 842e52afd66df0e62f70a8de1a4284910674e235..cccd707bb83941f397d2c68ceac0c740a0921bc1 100644 Binary files a/core/modules/hal/tests/fixtures/update/drupal-8.rest-hal_update_8301.php and b/core/modules/hal/tests/fixtures/update/drupal-8.rest-hal_update_8301.php differ diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php index 1939e04364bfa5d33858d5e51f2726b111556044..53c2dd71ac964d8dd743bdd57d6a9781e5888685 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php @@ -90,7 +90,7 @@ protected function getExpectedNormalizedEntity() { ], ], 'uuid' => [ - ['value' => $commented_entity->uuid()] + ['value' => $commented_entity->uuid()], ], ], ], @@ -105,7 +105,7 @@ protected function getExpectedNormalizedEntity() { ], ], 'uuid' => [ - ['value' => $author->uuid()] + ['value' => $author->uuid()], ], 'lang' => 'en', ], diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php index eff0b97e8c236b006c44b742de0a8fd966a296a3..7d9c28227dece91c036d262c77afa550815399da 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php @@ -68,7 +68,7 @@ protected function getExpectedNormalizedEntity() { ], ], 'uuid' => [ - ['value' => $author->uuid()] + ['value' => $author->uuid()], ], 'lang' => 'en', ], diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php index 43181323e32ecc4edbb0c7c9b7acc144794445ba..76f1d6fe9ef672e4c817276e5a1903b615b14596 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php @@ -35,10 +35,10 @@ protected function getExpectedNormalizedEntity() { return $normalization + [ '_links' => [ 'self' => [ - 'href' => $this->baseUrl . '/aggregator/sources/1?_format=hal_json' + 'href' => $this->baseUrl . '/aggregator/sources/1?_format=hal_json', ], 'type' => [ - 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed' + 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed', ], ], ]; @@ -51,7 +51,7 @@ protected function getNormalizedPostEntity() { return parent::getNormalizedPostEntity() + [ '_links' => [ 'type' => [ - 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed' + 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed', ], ], ]; diff --git a/core/modules/hal/tests/src/Functional/EntityResource/File/FileUploadHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/File/FileUploadHalJsonTestBase.php index 58df16bcf2830e4306c94b53c102b03cf15fa380..7694ea6cbf66f799732f5ed8bc28e77bf953832a 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/File/FileUploadHalJsonTestBase.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/File/FileUploadHalJsonTestBase.php @@ -54,7 +54,7 @@ protected function getExpectedNormalizedEntity($fid = 1, $expected_filename = 'e 'href' => $this->baseUrl . '/rest/type/file/file', ], $this->baseUrl . '/rest/relation/file/file/uid' => [ - ['href' => $this->baseUrl . '/user/' . $this->account->id() . '?_format=hal_json'] + ['href' => $this->baseUrl . '/user/' . $this->account->id() . '?_format=hal_json'], ], ], '_embedded' => [ diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php index c5ca04a7bd4a6c2a4dc2c65ba97f0791657af685..99445b719e0cd8a4ed9f1b691937a0bdce8c40bf 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php @@ -180,7 +180,7 @@ protected function getExpectedNormalizedFileEntity() { 'href' => $this->baseUrl . '/rest/type/file/file', ], $this->baseUrl . '/rest/relation/file/file/uid' => [ - ['href' => $this->baseUrl . '/user/' . $owner->id() . '?_format=hal_json'] + ['href' => $this->baseUrl . '/user/' . $owner->id() . '?_format=hal_json'], ], ], '_embedded' => [ diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php index e218a73a4201c5e01555351d3eb4f8d6fba14a30..9f73c26c78114722e78df67188cbb947506e7389 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php @@ -84,7 +84,7 @@ protected function getExpectedNormalizedEntity() { ], ], 'uuid' => [ - ['value' => $author->uuid()] + ['value' => $author->uuid()], ], ], ], @@ -99,7 +99,7 @@ protected function getExpectedNormalizedEntity() { ], ], 'uuid' => [ - ['value' => $author->uuid()] + ['value' => $author->uuid()], ], 'lang' => 'en', ], diff --git a/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php b/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php index 3e27ef637bb45713286c82d77e0687945e00f00b..2ebff2024706d8901581f5beab82abaa943fbf8f 100644 --- a/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php +++ b/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php @@ -51,7 +51,7 @@ public function testNodeTranslation() { 'sticky' => 0, 'body' => [ 'value' => $this->randomMachineName(), - 'format' => $this->randomMachineName() + 'format' => $this->randomMachineName(), ], 'revision_log' => $this->randomString(), ]); @@ -59,7 +59,7 @@ public function testNodeTranslation() { 'title' => 'German title', 'body' => [ 'value' => $this->randomMachineName(), - 'format' => $this->randomMachineName() + 'format' => $this->randomMachineName(), ], ]); $node->save(); diff --git a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php index 50f887d1f85abc2137bfd0511ac9df8aa0fb0f89..05a6b39f1ee78deffbb0372b17b8cae61c8be11a 100644 --- a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php +++ b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php @@ -72,10 +72,10 @@ public function testGetTypeUri($link_domain, $entity_type, $bundle, array $conte public function providerTestGetTypeUri() { $serialization_context_collecting_cacheability = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata() + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata(), ]; $expected_serialization_context_cacheability_url_site = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => (new CacheableMetadata())->setCacheContexts(['url.site']) + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => (new CacheableMetadata())->setCacheContexts(['url.site']), ]; $base_test_case = [ @@ -166,10 +166,10 @@ public function testGetRelationUri($link_domain, $entity_type, $bundle, $field_n public function providerTestGetRelationUri() { $serialization_context_collecting_cacheability = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata() + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata(), ]; $expected_serialization_context_cacheability_url_site = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => (new CacheableMetadata())->setCacheContexts(['url.site']) + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => (new CacheableMetadata())->setCacheContexts(['url.site']), ]; $field_name = $this->randomMachineName(); @@ -252,7 +252,7 @@ public function testGetRelationInternalIds() { 'entity_type_id' => 'node', 'entity_type' => \Drupal::entityTypeManager()->getDefinition('node'), 'bundle' => 'page', - 'field_name' => 'field_ref' + 'field_name' => 'field_ref', ], $internal_ids); } @@ -261,7 +261,7 @@ public function testGetRelationInternalIds() { */ public function testHalLinkManagersSetLinkDomain() { $serialization_context = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata() + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata(), ]; /* @var \Drupal\rest\LinkManager\LinkManager $link_manager */ diff --git a/core/modules/hal/tests/src/Kernel/NormalizeTest.php b/core/modules/hal/tests/src/Kernel/NormalizeTest.php index ffea170ba201a1054658f5be4f817f3b8c14f29f..6c93f23607af33e14560eef7ab6f864780278694 100644 --- a/core/modules/hal/tests/src/Kernel/NormalizeTest.php +++ b/core/modules/hal/tests/src/Kernel/NormalizeTest.php @@ -70,7 +70,7 @@ public function testNormalize() { 'name' => $this->randomMachineName(), 'field_test_entity_reference' => [ 'target_id' => $target_entity_en->id(), - ] + ], ]; $entity = EntityTest::create($values); diff --git a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php index a00d9e27f0c11af46aa9493a051c6584e413082e..77714d2388332196a2cf5dfd3c8f51a86aa478ac 100644 --- a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php +++ b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php @@ -115,7 +115,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { '#empty_option' => t('None (original image)'), '#options' => $image_styles, '#description' => $description_link->toRenderable() + [ - '#access' => $this->currentUser->hasPermission('administer image styles') + '#access' => $this->currentUser->hasPermission('administer image styles'), ], ]; $link_types = [ diff --git a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php index a06e0d7eec6602acf11ffb26f239debcab4ce0f5..66899fb8257ec67e63ad6da91f341ebea829e390 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php @@ -374,7 +374,7 @@ public function testInvalidDefaultImage() { 'settings' => [ 'default_image' => [ 'uuid' => 100000, - ] + ], ], ]); $field_storage->save(); @@ -389,7 +389,7 @@ public function testInvalidDefaultImage() { 'settings' => [ 'default_image' => [ 'uuid' => 100000, - ] + ], ], ]); $field->save(); diff --git a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php index c69a7136f12daa5d41d77a57eeee2439a6da91b6..aa9441e045415b682646680d12e19eb29365f6be 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php @@ -81,27 +81,27 @@ public function testResolution() { ]; $min_resolution = [ 'width' => 50, - 'height' => 50 + 'height' => 50, ]; $max_resolution = [ 'width' => 100, - 'height' => 100 + 'height' => 100, ]; $no_height_min_resolution = [ 'width' => 50, - 'height' => NULL + 'height' => NULL, ]; $no_height_max_resolution = [ 'width' => 100, - 'height' => NULL + 'height' => NULL, ]; $no_width_min_resolution = [ 'width' => NULL, - 'height' => 50 + 'height' => 50, ]; $no_width_max_resolution = [ 'width' => NULL, - 'height' => 100 + 'height' => 100, ]; $field_settings = [ 0 => $this->getFieldSettings($min_resolution, $max_resolution), diff --git a/core/modules/image/tests/src/Kernel/ImageImportTest.php b/core/modules/image/tests/src/Kernel/ImageImportTest.php index 14eeaa3f2b01b161783414148e1bde40ce29127e..9cf69570b68cb60d7a20ca39c4c099e13892a004 100644 --- a/core/modules/image/tests/src/Kernel/ImageImportTest.php +++ b/core/modules/image/tests/src/Kernel/ImageImportTest.php @@ -22,7 +22,7 @@ class ImageImportTest extends KernelTestBase { */ public function testImport() { $style = ImageStyle::create([ - 'name' => 'test' + 'name' => 'test', ]); $style->addImageEffect(['id' => 'image_module_test_null']); diff --git a/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php index 7abe47e47a7abbd0b1349ce987de86f31984dd66..0e6e3f2815b7fac585672ef2f20338446fa3f831 100644 --- a/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php +++ b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php @@ -127,7 +127,7 @@ public function testImageFormatterTheme() { ':fragment' => '#' . $fragment, ':url' => $url, ':width' => $image->getWidth(), - ':height' => $image->getHeight() + ':height' => $image->getHeight(), ]); $this->assertEqual(count($elements), 1, 'theme_image_formatter() correctly renders a link fragment.'); } diff --git a/core/modules/language/src/Form/LanguageFormBase.php b/core/modules/language/src/Form/LanguageFormBase.php index 8c8f5fac69967aeca9c08ccdd9164eebb28dc65d..d30c4b692285420baf0167f0f9f01a15baf6d6e8 100644 --- a/core/modules/language/src/Form/LanguageFormBase.php +++ b/core/modules/language/src/Form/LanguageFormBase.php @@ -50,11 +50,11 @@ public function commonForm(array &$form) { $form['langcode_view'] = [ '#type' => 'item', '#title' => $this->t('Language code'), - '#markup' => $language->id() + '#markup' => $language->id(), ]; $form['langcode'] = [ '#type' => 'value', - '#value' => $language->id() + '#value' => $language->id(), ]; } else { diff --git a/core/modules/language/src/Form/NegotiationConfigureForm.php b/core/modules/language/src/Form/NegotiationConfigureForm.php index 21c08c92b193b276dd99c097bdbc6dd8a259ee68..0b22bc70a496f4598181114aee20cccba50e1184 100644 --- a/core/modules/language/src/Form/NegotiationConfigureForm.php +++ b/core/modules/language/src/Form/NegotiationConfigureForm.php @@ -235,7 +235,7 @@ protected function configureFormTable(array &$form, $type) { '#attributes' => ['class' => ['language-customization-checkbox']], '#attached' => [ 'library' => [ - 'language/drupal.language.admin' + 'language/drupal.language.admin', ], ], ]; diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php index 87ad05bfd14b7c823da6ffaab27a8d92689b72c8..0f3dd1f0baa81f705ee7fe9eb448c98804da753c 100644 --- a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php +++ b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php @@ -170,7 +170,7 @@ public function testNodeTypeUpdate() { $this->assertTrue($configuration->isLanguageAlterable(), 'The alterable language configuration has been saved on the Article content type.'); // Update the article content type by changing the title label. $edit = [ - 'title_label' => 'Name' + 'title_label' => 'Name', ]; $this->drupalPostForm('admin/structure/types/manage/article', $edit, t('Save content type')); // Check that we still have the settings for the updated node type. @@ -189,7 +189,7 @@ public function testNodeTypeDelete() { if ($this->profile != 'standard') { $this->drupalCreateContentType([ 'type' => 'article', - 'name' => 'Article' + 'name' => 'Article', ]); } $admin_user = $this->drupalCreateUser(['administer content types']); @@ -240,7 +240,7 @@ public function testTaxonomyVocabularyUpdate() { $this->assertTrue($configuration->isLanguageAlterable(), 'The alterable language configuration has been saved on the Country vocabulary.'); // Update the vocabulary. $edit = [ - 'name' => 'Nation' + 'name' => 'Nation', ]; $this->drupalPostForm('admin/structure/taxonomy/manage/country', $edit, t('Save')); // Check that we still have the settings for the updated vocabulary. diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php index 27785c09529201c2753e04ce61ef5f7dac829a18..3ac9406252392ec6c07233f2e8164ac5092b7f4b 100644 --- a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php +++ b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php @@ -90,7 +90,7 @@ public function testEnabledLanguageContentNegotiator() { $config->set('configurable', [LanguageInterface::TYPE_INTERFACE, LanguageInterface::TYPE_CONTENT]); $config->set('negotiation.language_content.enabled', [ LanguageNegotiationUrl::METHOD_ID => 0, - LanguageNegotiationContentEntity::METHOD_ID => 1 + LanguageNegotiationContentEntity::METHOD_ID => 1, ]); $config->save(); @@ -105,7 +105,7 @@ public function testEnabledLanguageContentNegotiator() { // language-url. $config->set('negotiation.language_content.enabled', [ LanguageNegotiationContentEntity::METHOD_ID => 0, - LanguageNegotiationUrl::METHOD_ID => 1 + LanguageNegotiationUrl::METHOD_ID => 1, ]); $config->save(); diff --git a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php index 7021aa0027fafbd2140a3b1349ee5695eae9d073..07eec52514d3925abdb8aa03e5bcbfc4e286d9a4 100644 --- a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php +++ b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php @@ -108,7 +108,7 @@ public function testDomainNameNegotiationPort() { $edit = [ 'language_negotiation_url_part' => LanguageNegotiationUrl::CONFIG_DOMAIN, 'domain[en]' => $base_url_host, - 'domain[fr]' => $language_domain + 'domain[fr]' => $language_domain, ]; $this->drupalPostForm('admin/config/regional/language/detection/url', $edit, t('Save configuration')); // Rebuild the container so that the new language gets picked up by services diff --git a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php index fb62f48158dc5e677007d4a00432aaf1c67e64ce..8154e42a46affdb45b2e73c489a79685e648abc0 100644 --- a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php +++ b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php @@ -74,7 +74,7 @@ public function testEntityUrlLanguageWithLanguageContentEnabled() { $config->set('configurable', [LanguageInterface::TYPE_INTERFACE, LanguageInterface::TYPE_CONTENT]); $config->set('negotiation.language_content.enabled', [ LanguageNegotiationContentEntity::METHOD_ID => 0, - LanguageNegotiationUrl::METHOD_ID => 1 + LanguageNegotiationUrl::METHOD_ID => 1, ]); $config->save(); @@ -98,7 +98,7 @@ public function testEntityUrlLanguageWithLanguageContentEnabled() { // where the language-content-entity is turned off. $config->set('negotiation.language_content.enabled', [ LanguageNegotiationUrl::METHOD_ID => 0, - LanguageNegotiationContentEntity::METHOD_ID => 1 + LanguageNegotiationContentEntity::METHOD_ID => 1, ]); $config->save(); diff --git a/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php b/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php index c94d623e93945ad66bcd4e13fdddd575efce19d3..004207281cd0bf1116b01603ee1a3016d4c573fe 100644 --- a/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php +++ b/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php @@ -48,7 +48,7 @@ public function testFilter() { 'en', 'xx-lolspeak', 'und', - 'zxx' + 'zxx', ]; $this->assertIdentical(array_keys($view->filter['langcode']->getValueOptions()), $expected); diff --git a/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php index 5d772a98ceedb1d9e1109cee4e706c643513de5f..8fa765e0b6cb551f2b6719b781885f90ae4f94d8 100644 --- a/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php +++ b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php @@ -32,7 +32,7 @@ class LinkItem extends FieldItemBase implements LinkItemInterface { public static function defaultFieldSettings() { return [ 'title' => DRUPAL_OPTIONAL, - 'link_type' => LinkItemInterface::LINK_GENERIC + 'link_type' => LinkItemInterface::LINK_GENERIC, ] + parent::defaultFieldSettings(); } diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php index 7570fe92414a64684173c162483dccd7a80b21a0..3a124138f8407a6110bd677f1c0ca6c146381c3a 100644 --- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php @@ -252,7 +252,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen } $element['title']['#states']['required'] = [ - ':input[name="' . $selector . '[' . $delta . '][uri]"]' => ['filled' => TRUE] + ':input[name="' . $selector . '[' . $delta . '][uri]"]' => ['filled' => TRUE], ]; } } diff --git a/core/modules/link/src/Tests/Views/LinkViewsTokensTest.php b/core/modules/link/src/Tests/Views/LinkViewsTokensTest.php index 968c02f8306a79d9514ff035b54d2770bdc24140..f3ff80a1bc0c410fe7ae84de8acbc2c04d3342f7 100644 --- a/core/modules/link/src/Tests/Views/LinkViewsTokensTest.php +++ b/core/modules/link/src/Tests/Views/LinkViewsTokensTest.php @@ -45,7 +45,7 @@ protected function setUp($import_test_views = TRUE) { // Create Basic page node type. $this->drupalCreateContentType([ 'type' => 'page', - 'name' => 'Basic page' + 'name' => 'Basic page', ]); // Create a field. diff --git a/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc index c9cfdd5cb03d389b9887a2f0e30571a4ccc83d0d..284b7fc6969d1086a21b986de73e970046843e44 100644 --- a/core/modules/locale/locale.batch.inc +++ b/core/modules/locale/locale.batch.inc @@ -242,7 +242,7 @@ function locale_translation_http_check($uri) { 'allow_redirects' => [ 'on_redirect' => function (RequestInterface $request, ResponseInterface $response, UriInterface $request_uri) use (&$actual_uri) { $actual_uri = (string) $request_uri; - } + }, ], ])->head($uri); $result = []; diff --git a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php index 2550031ea6506bdc55af6e9e8ac57b3d2fc04369..058d9ddf8e77eb495a68b2421e2c150611bd4acc 100644 --- a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php @@ -131,7 +131,7 @@ public function testConfigTranslationModuleInstall() { $expected = [ 'translatable_no_default' => 'This translation is preserved', 'translatable_default_with_translation' => 'This translation is preserved', - 'translatable_default_with_no_translation' => 'This translation is preserved' + 'translatable_default_with_no_translation' => 'This translation is preserved', ]; $this->assertEqual($expected, $override->get()); } @@ -204,7 +204,7 @@ public function testLocaleRemovalAndConfigOverridePreserve() { $expected = [ 'translatable_default_with_translation' => 'Locale can translate Afrikaans', 'translatable_no_default' => 'This translation is preserved', - 'translatable_default_with_no_translation' => 'This translation is preserved' + 'translatable_default_with_no_translation' => 'This translation is preserved', ]; $this->assertEqual($expected, $override->get()); @@ -226,7 +226,7 @@ public function testLocaleRemovalAndConfigOverridePreserve() { $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings'); $expected = [ 'translatable_no_default' => 'This translation is preserved', - 'translatable_default_with_no_translation' => 'This translation is preserved' + 'translatable_default_with_no_translation' => 'This translation is preserved', ]; $this->assertEqual($expected, $override->get()); } diff --git a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php index ee496e248a2330daa24374f3e08131333c373040..c38da43d77fcf5a5ac01c04c7918b71c786d4015 100644 --- a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php @@ -45,7 +45,7 @@ public function testFileConfigurationPage() { // The setting should persist. $translation_path = $this->publicFilesDirectory . '/translations_changed'; $fields = [ - 'translation_path' => $translation_path + 'translation_path' => $translation_path, ]; $this->drupalPostForm(NULL, $fields, t('Save configuration')); $this->drupalGet('admin/config/media/file-system'); diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php index 170605e96abc6dedcf259c33ec86eec84be076a2..0ab558503c734205b2bac098d60fa6f526cefbcf 100644 --- a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php @@ -85,7 +85,7 @@ public function testInterface() { $release_details = new FormattableMarkup('@module (@version). @info', [ '@module' => 'Locale test translate', '@version' => '1.3-dev', - '@info' => t('File not found at %local_path', ['%local_path' => 'core/modules/locale/tests/test.de.po']) + '@info' => t('File not found at %local_path', ['%local_path' => 'core/modules/locale/tests/test.de.po']), ]); $this->assertRaw($release_details->__toString(), 'Release details'); diff --git a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php index b8f4109b42fbe791d7e78c6b8418daf915c7094d..6ce4ccc713d64bca1c22c9f3bb717c120d37250f 100644 --- a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php +++ b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php @@ -41,7 +41,7 @@ public function testBlockContextualLinks() { $block = $this->drupalPlaceBlock('system_menu_block:' . $menu->id(), [ 'label' => 'Custom menu', - 'provider' => 'system' + 'provider' => 'system', ]); $this->addMenuLink('', '/', $menu->id()); @@ -150,7 +150,7 @@ protected function addMenuLink($parent = '', $path = '/', $menu_id = 'tools', $e $this->assertMenuLink([ 'menu_name' => $menu_id, 'children' => [], - 'parent' => $parent + 'parent' => $parent, ], $menu_link->getPluginId()); return $menu_link; diff --git a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php index ccbebff30794036e613cf5dea2941812c100e6b9..5e890a0e6a0756326b4376f1d4ff9cc0551c8d9a 100644 --- a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php +++ b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php @@ -41,7 +41,7 @@ public function testExceptionThrow() { 'uri' => [ 'plugin' => 'download', 'source' => ['url', 'uri'], - ] + ], ], 'destination' => [ 'plugin' => 'entity:file', diff --git a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php index 14e50b9514506f05846d469973401219ee178b78..27aa45bcceb045d21c51cbebebe428d2320a58cb 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php @@ -34,7 +34,7 @@ public function testConfigRollback() { $ids = [ 'id' => [ - 'type' => 'string' + 'type' => 'string', ], ]; $definition = [ @@ -100,12 +100,12 @@ public function testConfigRollback() { $ids = [ 'id' => [ - 'type' => 'string' + 'type' => 'string', ], 'language' => [ - 'type' => 'string' - ] + 'type' => 'string', + ], ]; $definition = [ 'id' => 'i18n_config', diff --git a/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php b/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php index a63995922dc1f6ebaecc86b3b2701fc8e3475ff3..d43ad8af586b318cd93eb2b0294c72757c51abb5 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php @@ -83,14 +83,14 @@ public function testConfigEntityRollback() { 'name' => '1', 'language' => 'fr', 'property' => 'name', - 'translation' => 'fr - categories' + 'translation' => 'fr - categories', ], [ 'id' => '2', 'name' => '2', 'language' => 'fr', 'property' => 'name', - 'translation' => 'fr - tags' + 'translation' => 'fr - tags', ], ]; $ids = [ @@ -106,7 +106,7 @@ public function testConfigEntityRollback() { 'ids' => $ids, 'constants' => [ 'name' => 'name', - ] + ], ], 'process' => [ 'vid' => 'id', diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php index 287860a36a0a154342a3ed132a39d3345c23c3e3..2cb6f672df97abf188e0d500a0d58edcda9e77a4 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php @@ -39,7 +39,7 @@ public function testGetMigrationDependencies() { 'f1' => 'bar', 'f2' => [ 'plugin' => 'migration', - 'migration' => 'm1' + 'migration' => 'm1', ], 'f3' => [ 'plugin' => 'sub_process', @@ -52,7 +52,7 @@ public function testGetMigrationDependencies() { ], 'f4' => [ 'plugin' => 'migration_lookup', - 'migration' => 'm3' + 'migration' => 'm3', ], 'f5' => [ 'plugin' => 'sub_process', diff --git a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php index 644371e5f5d35c4b7556177dde1b082b934f3a15..cdc129553594f7ea8f80c0b6d10bcc2fed0906aa 100644 --- a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php @@ -50,17 +50,17 @@ public function testSuccessfulCopies() { // Test a local to local copy. [ $this->root . '/core/modules/simpletest/files/image-test.jpg', - 'public://file1.jpg' + 'public://file1.jpg', ], // Test a temporary file using an absolute path. [ $file_absolute, - 'temporary://test.jpg' + 'temporary://test.jpg', ], // Test a temporary file using a relative path. [ $file_absolute, - 'temporary://core/modules/simpletest/files/test.jpg' + 'temporary://core/modules/simpletest/files/test.jpg', ], ]; foreach ($data_sets as $data) { @@ -113,17 +113,17 @@ public function testSuccessfulMoves() { // Test a local to local copy. [ $local_file, - 'public://file1.jpg' + 'public://file1.jpg', ], // Test a temporary file using an absolute path. [ $file_1_absolute, - 'temporary://test.jpg' + 'temporary://test.jpg', ], // Test a temporary file using a relative path. [ $file_2_absolute, - 'temporary://core/modules/simpletest/files/test.jpg' + 'temporary://core/modules/simpletest/files/test.jpg', ], ]; foreach ($data_sets as $data) { diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php index f199562b6b3d8721adf7a9d60132691360e79885..8f33ba6db1506d67c9a9af9376e88051786fea40 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php @@ -384,7 +384,7 @@ public function testImportWithValidRowWithException() { public function testProcessRow() { $expected = [ 'test' => 'test destination', - 'test1' => 'test1 destination' + 'test1' => 'test1 destination', ]; foreach ($expected as $key => $value) { $plugins[$key][0] = $this->getMock('Drupal\migrate\Plugin\MigrateProcessInterface'); diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php index 3c3cba8859d27e8f16be6831cf7ce0d8307cd7a1..1a33974471eb02e8f6e6b4311732cb7fb8a54d0e 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php @@ -28,7 +28,7 @@ public function testEnsureTablesNotExist() { 'type' => 'varchar', 'length' => 64, 'not null' => 1, - 'description' => 'Hash of source ids. Used as primary key' + 'description' => 'Hash of source ids. Used as primary key', ]; $fields['sourceid1'] = [ 'type' => 'int', @@ -101,7 +101,7 @@ public function testEnsureTablesNotExist() { 'type' => 'varchar', 'length' => 64, 'not null' => 1, - 'description' => 'Hash of source ids. Used as primary key' + 'description' => 'Hash of source ids. Used as primary key', ]; $fields['level'] = [ 'type' => 'int', diff --git a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php index e6722044234ffe23b0d82e8ddf9ab834985778cb..e7d1718706483d38eb518e355dfa14a228279904 100644 --- a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php +++ b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php @@ -50,11 +50,11 @@ public function providerCallbackExceptions() { return [ 'not set' => [ 'message' => 'The "callable" must be set.', - 'configuration' => [] + 'configuration' => [], ], 'invalid method' => [ 'message' => 'The "callable" must be a valid function or method.', - 'configuration' => ['callable' => 'nonexistent_callable'] + 'configuration' => ['callable' => 'nonexistent_callable'], ], ]; } diff --git a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php index 7038c23868f1f6552f6a3cdd8d9f03dad9c8b091..994de3855fbd9a8ae3c598a0206c4a15113de4d0 100644 --- a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php +++ b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php @@ -85,7 +85,7 @@ public function providerTestDeprecatedTimezoneConfigurationKey() { 'timezone' => 'America/Managua', ], 'value' => '2004-12-19T10:19:42-0600', - 'expected' => '2004-12-19T10:19:42-06:00 -06:00' + 'expected' => '2004-12-19T10:19:42-06:00 -06:00', ], ]; } diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php index 20b80957db323b2ff71c9b875c644fff18b54461..3cf4031907387ff2536c041df636a2e89a4d645a 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php @@ -72,7 +72,7 @@ public function providerSource() { ], 'collections' => [ 'language.af', - ] + ], ]; // Test with name and no collection in configuration. diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php index 152706798c998c6c10402b8c8f5f366b875b4f8a..1d7f2d944bc4876d831add8e64a069e405979eb2 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php @@ -43,7 +43,7 @@ class VariableTranslationTest extends MigrateSqlSourceTestCase { 'language' => 'mi', 'site_slogan' => 'Ko whakamataku heke', 'site_name' => 'ingoa_pae', - ] + ], ]; /** diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php index d1905b0e6ca69dd0d7241710c7452042b0c335f4..d2a15666d1f2b8e366f2e10578a49ecc8f5380e6 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php @@ -44,7 +44,7 @@ class i18nVariableTest extends MigrateSqlSourceTestCase { 'language' => 'mi', 'site_slogan' => 'Ko whakamataku heke', 'site_name' => 'ingoa_pae', - ] + ], ]; /** diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc index fe48692a8473a34961b9e8f923fb8dd6c03e6d83..bd1b6232ad6ed68907ed3cc227db530dd57dc2c7 100644 --- a/core/modules/node/node.admin.inc +++ b/core/modules/node/node.admin.inc @@ -35,7 +35,7 @@ function node_mass_update(array $nodes, array $updates, $langcode = NULL, $load if (count($nodes) > 10) { $batch = [ 'operations' => [ - ['_node_mass_update_batch_process', [$nodes, $updates, $langcode, $load, $revisions]] + ['_node_mass_update_batch_process', [$nodes, $updates, $langcode, $load, $revisions]], ], 'finished' => '_node_mass_update_batch_finished', 'title' => t('Processing'), diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index dd151a4a96019e22ef9ad399897818c6ee81e389..b0a87d889a558f033422d78e5a7460a3e9f70159 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -169,7 +169,7 @@ function hook_node_access_records(\Drupal\node\NodeInterface $node) { 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0, - 'langcode' => 'ca' + 'langcode' => 'ca', ]; } // For the example_author array, the GID is equivalent to a UID, which @@ -183,7 +183,7 @@ function hook_node_access_records(\Drupal\node\NodeInterface $node) { 'grant_view' => 1, 'grant_update' => 1, 'grant_delete' => 1, - 'langcode' => 'ca' + 'langcode' => 'ca', ]; } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index b26be926846b1c4e0b430a0c2c775a3f633851f5..ea27e269b2aa9cc8e4f76b722a6b5a64c0ca38d0 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -841,7 +841,7 @@ function node_page_top(array &$page) { $page['page_top']['node_preview'] = [ '#type' => 'container', '#attributes' => [ - 'class' => ['node-preview-container', 'container-inline'] + 'class' => ['node-preview-container', 'container-inline'], ], ]; @@ -1185,7 +1185,7 @@ function node_access_rebuild($batch_mode = FALSE) { 'operations' => [ ['_node_access_rebuild_batch_operation', []], ], - 'finished' => '_node_access_rebuild_batch_finished' + 'finished' => '_node_access_rebuild_batch_finished', ]; batch_set($batch); } diff --git a/core/modules/node/src/Form/NodePreviewForm.php b/core/modules/node/src/Form/NodePreviewForm.php index b06a65712fd42c06d67439e2d06e2aa990cbae07..75ed61d233a8b300945d9ee0984422d5761dba63 100644 --- a/core/modules/node/src/Form/NodePreviewForm.php +++ b/core/modules/node/src/Form/NodePreviewForm.php @@ -107,7 +107,7 @@ public function buildForm(array $form, FormStateInterface $form_state, EntityInt '#default_value' => $view_mode, '#attributes' => [ 'data-drupal-autosubmit' => TRUE, - ] + ], ]; $form['submit'] = [ diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php index 12f276ef17d82ab7ace7d93a204da74482e7c899..702d8d74a5cf4fdd5c5be97d715e114f2e27a593 100644 --- a/core/modules/node/src/NodeForm.php +++ b/core/modules/node/src/NodeForm.php @@ -102,7 +102,7 @@ public function form(array $form, FormStateInterface $form_state) { if ($this->operation == 'edit') { $form['#title'] = $this->t('Edit @type @title', [ '@type' => node_get_type_label($node), - '@title' => $node->label() + '@title' => $node->label(), ]); } diff --git a/core/modules/node/src/NodeTypeListBuilder.php b/core/modules/node/src/NodeTypeListBuilder.php index be6e5f638b909a37e6dd288ca01160ca4731fd99..870729891a3eb0b4de86cd1a31813bb4cc2cf8c0 100644 --- a/core/modules/node/src/NodeTypeListBuilder.php +++ b/core/modules/node/src/NodeTypeListBuilder.php @@ -56,7 +56,7 @@ public function getDefaultOperations(EntityInterface $entity) { public function render() { $build = parent::render(); $build['table']['#empty'] = $this->t('No content types available. Add content type.', [ - ':link' => Url::fromRoute('node.type_add')->toString() + ':link' => Url::fromRoute('node.type_add')->toString(), ]); return $build; } diff --git a/core/modules/node/src/NodeViewBuilder.php b/core/modules/node/src/NodeViewBuilder.php index 2fc67283f083719a987f228e75cf4a1e64dc5308..43efecb4a4da4911bb1048e032c0161dce21266f 100644 --- a/core/modules/node/src/NodeViewBuilder.php +++ b/core/modules/node/src/NodeViewBuilder.php @@ -46,7 +46,7 @@ public function buildComponents(array &$build, array $entities, array $displays, '#title' => t('Language'), '#markup' => $entity->language()->getName(), '#prefix' => '
                ', - '#suffix' => '
                ' + '#suffix' => '', ]; } } diff --git a/core/modules/node/src/NodeViewsData.php b/core/modules/node/src/NodeViewsData.php index a122203d6f8ff38b5ef3ecce9491b7bc451a0a2a..e13e76cdff676b4c5727e96f2964bcf46f8f66d6 100644 --- a/core/modules/node/src/NodeViewsData.php +++ b/core/modules/node/src/NodeViewsData.php @@ -322,7 +322,7 @@ public function getViewsData() { 'field' => 'sid', 'table' => 'search_index', 'extra' => "node_search_index.type = 'node_search' AND node_search_index.langcode = node_field_data.langcode", - ] + ], ]; $data['node_search_total']['table']['join'] = [ diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index 52c121e69d675b8904f2cbcbbe4234b096de78b6..b043d63681e139f71cf04c389db6c8c71447dcea 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -487,7 +487,7 @@ protected function indexNode(NodeInterface $node) { '#prefix' => '

                ', '#plain_text' => $node->label(), '#suffix' => '

                ', - '#weight' => -1000 + '#weight' => -1000, ]; $text = $this->renderer->renderPlain($build); @@ -793,7 +793,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta '#open' => TRUE, ]; $form['content_ranking']['info'] = [ - '#markup' => '

                ' . $this->t('Influence is a numeric multiplier used in ordering search results. A higher number means the corresponding factor has more influence on search results; zero means the factor is ignored. Changing these numbers does not require the search index to be rebuilt. Changes take effect immediately.') . '

                ' + '#markup' => '

                ' . $this->t('Influence is a numeric multiplier used in ordering search results. A higher number means the corresponding factor has more influence on search results; zero means the factor is ignored. Changing these numbers does not require the search index to be rebuilt. Changes take effect immediately.') . '

                ', ]; // Prepare table. $header = [$this->t('Factor'), $this->t('Influence')]; diff --git a/core/modules/node/src/Plugin/views/wizard/Node.php b/core/modules/node/src/Plugin/views/wizard/Node.php index c9929c51f4adfa7f8ce96bd5c06bc684d3747daf..0fd93675a8f331292e86fee1a27f9cef7dca628d 100644 --- a/core/modules/node/src/Plugin/views/wizard/Node.php +++ b/core/modules/node/src/Plugin/views/wizard/Node.php @@ -37,7 +37,7 @@ class Node extends WizardPluginBase { public function getAvailableSorts() { // You can't execute functions in properties, so override the method return [ - 'node_field_data-title:ASC' => $this->t('Title') + 'node_field_data-title:ASC' => $this->t('Title'), ]; } diff --git a/core/modules/node/src/Tests/NodeRevisionsTest.php b/core/modules/node/src/Tests/NodeRevisionsTest.php index c36452d9ab3c890810792efe4230e39c64d835ab..fdc929a84c7002e2ca4b10f7e68f6dddac122407 100644 --- a/core/modules/node/src/Tests/NodeRevisionsTest.php +++ b/core/modules/node/src/Tests/NodeRevisionsTest.php @@ -174,7 +174,7 @@ public function testRevisions() { $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-date' => format_date($nodes[1]->getRevisionCreationTime()), ]), 'Revision reverted.'); $node_storage->resetCache([$node->id()]); $reverted_node = $node_storage->load($node->id()); diff --git a/core/modules/node/src/Tests/NodeTestBase.php b/core/modules/node/src/Tests/NodeTestBase.php index 2dcaba5b38fc88b860fe05780bcd76130b3a2e54..643684cde43c02cc984980c0efba8abc0d5106a1 100644 --- a/core/modules/node/src/Tests/NodeTestBase.php +++ b/core/modules/node/src/Tests/NodeTestBase.php @@ -105,7 +105,7 @@ public function nodeAccessAssertMessage($operation, $result, $langcode = NULL) { [ '@result' => $result ? 'true' : 'false', '%op' => $operation, - '%langcode' => !empty($langcode) ? $langcode : 'empty' + '%langcode' => !empty($langcode) ? $langcode : 'empty', ] ); } diff --git a/core/modules/node/src/Tests/NodeTypeTest.php b/core/modules/node/src/Tests/NodeTypeTest.php index 70d3ac40b52acb89964f2efc3428e071ccb6b759..9938bb0ab53cfd4d75fe2da892bd5ea07e06af43 100644 --- a/core/modules/node/src/Tests/NodeTypeTest.php +++ b/core/modules/node/src/Tests/NodeTypeTest.php @@ -249,7 +249,7 @@ public function testNodeTypeNoContentType() { // Navigate to content type administration screen $this->drupalGet('admin/structure/types'); $this->assertRaw(t('No content types available. Add content type.', [ - ':link' => Url::fromRoute('node.type_add')->toString() + ':link' => Url::fromRoute('node.type_add')->toString(), ]), 'Empty text when there are no content types in the system is correct.'); $bundle_info->clearCachedBundles(); diff --git a/core/modules/node/src/Tests/PagePreviewTest.php b/core/modules/node/src/Tests/PagePreviewTest.php index e9f607cf26ea0cc221e1ef75e9a12fc9b1daaebf..bcbe5d7a2acf94c4f3711a51ba7458405c1b4d49 100644 --- a/core/modules/node/src/Tests/PagePreviewTest.php +++ b/core/modules/node/src/Tests/PagePreviewTest.php @@ -133,7 +133,7 @@ protected function setUp() { 'type' => 'text', 'settings' => [ 'max_length' => 50, - ] + ], ]); $field_storage->save(); FieldConfig::create([ diff --git a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php index aa224824d5dd28edaf0db1efcbed7b99b7c9a346..ab6f28df94fcbdeb61a2541904de65402d8782b9 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php @@ -54,7 +54,7 @@ protected function setUp() { FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'entity_type' => 'node', - 'type' => 'text' + 'type' => 'text', ])->save(); FieldConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php index 6c5bcd4ed0fd459167cd9054fce4a9771585cff5..5d987b36a17d7a957b239d0bf4999bb5cb015a82 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php @@ -33,7 +33,7 @@ protected function setUp() { $this->contentAdminUser = $this->drupalCreateUser([ 'access content', 'administer content types', - 'administer menu' + 'administer menu', ]); $this->config('user.role.' . RoleInterface::ANONYMOUS_ID)->set('permissions', [])->save(); diff --git a/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php b/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php index 9ea75ccff762fe89d3ef6de9fb2cd462e5c0cd4c..7ed8413fc7984c37cc4fbec7cf81dfda42471fc1 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php @@ -52,7 +52,7 @@ public function testNodeAccessRebuildNodeGrants() { for ($i = 0; $i < 30; $i++) { $nodes[] = $this->drupalCreateNode([ 'uid' => $this->webUser->id(), - 'private' => [['value' => 1]] + 'private' => [['value' => 1]], ]); } diff --git a/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php b/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php index 66660f9507bdebd74afb5d2e6648eaa5d5fdc19b..f10d8b7389d66d1b2008376a2f38186d2d1aeb8d 100644 --- a/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php +++ b/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php @@ -49,7 +49,7 @@ public function testAnonymousPagePreview() { // Fill in node creation form and preview node. $edit = [ $title_key => $this->randomMachineName(), - $body_key => $this->randomMachineName() + $body_key => $this->randomMachineName(), ]; $this->drupalPostForm('node/add/page', $edit, t('Preview')); diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php index bee787f742a33545aad48ce84b0562040285d81b..238c7317e2a23fedc891964a366540975c399a36 100644 --- a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php +++ b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php @@ -46,7 +46,7 @@ protected function setUp() { 'revert page revisions', 'delete page revisions', 'edit any page content', - 'delete any page content' + 'delete any page content', ] ); $this->drupalLogin($web_user); @@ -122,7 +122,7 @@ public function testRevisions() { 'revert all revisions', 'delete all revisions', 'edit any page content', - 'delete any page content' + 'delete any page content', ] ); $this->drupalLogin($content_admin); @@ -147,7 +147,7 @@ public function testRevisions() { [ '@type' => 'Basic page', '%title' => $nodes[1]->getTitle(), - '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()) + '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()), ]), 'Revision reverted.'); $node_storage->resetCache([$node->id()]); diff --git a/core/modules/node/tests/src/Functional/NodeTestBase.php b/core/modules/node/tests/src/Functional/NodeTestBase.php index 2ef0d73c50c3ad1107beab8251df62f177cabfa7..e52708632b9e2b3648debaf2d1018ddd6254bb35 100644 --- a/core/modules/node/tests/src/Functional/NodeTestBase.php +++ b/core/modules/node/tests/src/Functional/NodeTestBase.php @@ -102,7 +102,7 @@ public function nodeAccessAssertMessage($operation, $result, $langcode = NULL) { [ '@result' => $result ? 'true' : 'false', '%op' => $operation, - '%langcode' => !empty($langcode) ? $langcode : 'empty' + '%langcode' => !empty($langcode) ? $langcode : 'empty', ] ); } diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php index 6bdc065f4a9e9b0e465796a8ae0682b3e2c414fd..46516fe74aade0078e5e040bc4093d44444b5322 100644 --- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php +++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php @@ -99,7 +99,7 @@ public function testPublishedStatusNoFields() { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $edit = $this->getEditValues($values, $langcode); $edit['status[value]'] = FALSE; diff --git a/core/modules/node/tests/src/Functional/NodeViewTest.php b/core/modules/node/tests/src/Functional/NodeViewTest.php index b0eaa47f6680f200f6f2cb7e430184d5a57de5dd..36a26fc370f04cf7ffb5fc0cdc6a61dfba5ab7dc 100644 --- a/core/modules/node/tests/src/Functional/NodeViewTest.php +++ b/core/modules/node/tests/src/Functional/NodeViewTest.php @@ -47,7 +47,7 @@ public function testHtmlHeadLinks() { // ensure caches are handled properly. $this->drupalLogin($this->rootUser); $edit = [ - 'anonymous[edit own ' . $node->bundle() . ' content]' => TRUE + 'anonymous[edit own ' . $node->bundle() . ' content]' => TRUE, ]; $this->drupalPostForm('admin/people/permissions', $edit, 'Save permissions'); $this->drupalLogout(); diff --git a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php index 37a6b91f3f5a88d5dc5fc83d2ab643f6bbe7fdb8..618119c061622a7ecdb2a536a7d4a64b57d43a24 100644 --- a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php +++ b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php @@ -284,7 +284,7 @@ protected function doTestFrontPageViewCacheTags($do_assert_views_caches) { [ 'value' => $this->randomMachineName(32), 'format' => filter_default_format(), - ] + ], ], 'type' => 'article', 'created' => $i, diff --git a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php index d2d1b479a4085fec79f47b592b19acee7d381ea1..31e085213ceae054796ac1c6c1f41be4beff9507 100644 --- a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php +++ b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php @@ -75,7 +75,7 @@ protected function setUp($import_test_views = TRUE) { ], 'fr' => [ 'Premier nœud fr', - ] + ], ]; // Create nodes with translations. diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php index 9f28c065ae6cad030eca23c66b3779eab3a49367..34c8dd3ddc9e2a53ecb3d1491925c21049820252 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php @@ -36,7 +36,7 @@ protected function setUp() { $this->executeMigrations([ 'd6_node_setting_promote', 'd6_node_setting_status', - 'd6_node_setting_sticky' + 'd6_node_setting_sticky', ]); } diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php b/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php index bc377b094a1ba08af03c8435ae452a85536485de..06bedade85a32bad8e4d61d863edbd08808dca84 100644 --- a/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php +++ b/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php @@ -78,20 +78,20 @@ public function testViewsTestOptionsListGroupedFilter() { 'operator' => 'or', 'value' => [ $this->fieldValues[0] => $this->fieldValues[0], - ] + ], ], 2 => [ 'title' => 'Second', 'operator' => 'or', 'value' => [ $this->fieldValues[1] => $this->fieldValues[1], - ] + ], ], ], ], 'reduce_duplicates' => '', 'plugin_id' => 'list_field', - ] + ], ]; $view->setDisplay(); $view->displayHandlers->get('default')->overrideOption('filters', $filters); diff --git a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php index 8b5442c7fe4f8d28caeabcc3272df2691efe9acf..3e90d8eb2c080992c816d6b249b94dfeaf7ecab3 100644 --- a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php +++ b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php @@ -370,7 +370,7 @@ public function testPageCacheAnonymous403404() { 0 => [ 'value' => $this->randomString(), 'format' => 'plain_text', - ] + ], ], ]; $entity = EntityTest::create($entity_values); diff --git a/core/modules/path/src/Form/PathFormBase.php b/core/modules/path/src/Form/PathFormBase.php index 2aa785cd7383cb13b389267c37693aec0854ebc6..4b1cbd59127885b67711dac453099b71703728c9 100644 --- a/core/modules/path/src/Form/PathFormBase.php +++ b/core/modules/path/src/Form/PathFormBase.php @@ -138,7 +138,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $pid = NU else { $form['langcode'] = [ '#type' => 'value', - '#value' => $this->path['langcode'] + '#value' => $this->path['langcode'], ]; } diff --git a/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php b/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php index 602e84f42f6884c37a31f3d92846048ddb6b76c1..773b792f38a7bd29edcdb9c199f3d620a975c190 100644 --- a/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php +++ b/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php @@ -42,7 +42,7 @@ protected function setUp() { public function testNoCanonicalLinkTemplate() { $entity_type = EntityTestTranslatableUISkip::create([ 'name' => 'name english', - 'language' => 'en' + 'language' => 'en', ]); $entity_type->save(); diff --git a/core/modules/quickedit/src/QuickEditController.php b/core/modules/quickedit/src/QuickEditController.php index 0f470b1e474d0c684f3f94b52d45708fd53b5636..3bed196661f71bcc05eb5fcea1c8f1044e839d2c 100644 --- a/core/modules/quickedit/src/QuickEditController.php +++ b/core/modules/quickedit/src/QuickEditController.php @@ -221,7 +221,7 @@ public function fieldForm(EntityInterface $entity, $field_name, $langcode, $view $errors = $form_state->getErrors(); if (count($errors)) { $status_messages = [ - '#type' => 'status_messages' + '#type' => 'status_messages', ]; $response->addCommand(new FieldFormValidationErrorsCommand($this->renderer->renderRoot($status_messages))); } @@ -293,7 +293,7 @@ public function entitySave(EntityInterface $entity) { // to identify it. $output = [ 'entity_type' => $entity->getEntityTypeId(), - 'entity_id' => $entity->id() + 'entity_id' => $entity->id(), ]; // Respond to client that the entity was saved properly. diff --git a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php index 9957a67ee01b6c09507eefe37920201e6341345d..61af1f52b632dd3f59b9c21ecc5026a5c4fe638a 100644 --- a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php +++ b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php @@ -86,7 +86,7 @@ protected function setUp() { 0 => [ 'value' => '

                How are you?

                ', 'format' => 'filtered_html', - ] + ], ], 'revision_log' => $this->randomString(), ]); @@ -187,7 +187,7 @@ public function testUserWithPermission() { 'label' => 'Body', 'access' => TRUE, 'editor' => 'form', - ] + ], ]; $this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.'); // Restore drupalSettings to build the next requests; simpletest wipes them @@ -373,7 +373,7 @@ public function testTitleBaseField() { 'label' => 'Title', 'access' => TRUE, 'editor' => 'plain_text', - ] + ], ]; $this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.'); // Restore drupalSettings to build the next requests; simpletest wipes them diff --git a/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php b/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php index 42c4103dca482a7ef6bed1346b26cced5822fa42..e0079e402fae317dde8bf26723576fe743fe6bd4 100644 --- a/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php +++ b/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php @@ -169,7 +169,7 @@ public function testEditorWithCustomMetadata() { 'label' => 'Rich text field', 'editor' => 'wysiwyg', 'custom' => [ - 'format' => 'full_html' + 'format' => 'full_html', ], ]; $this->assertEqual($expected, $metadata, 'The correct metadata (including custom metadata) is generated.'); diff --git a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php index 29437485878e419bb43105828f1bd70d63cadf2a..8cc2d2f8b628906dfd9d0cef93952c34c0917cd6 100644 --- a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php +++ b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php @@ -97,7 +97,7 @@ protected function createFieldWithStorage($field_name, $type, $cardinality, $lab ->setComponent($field_name, [ 'label' => 'above', 'type' => $formatter_type, - 'settings' => $formatter_settings + 'settings' => $formatter_settings, ]) ->save(); } diff --git a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php index 7e98286002b34f9b793dba1d17bba588a06c7b1f..fddd440894e712f6c764fe7b4002c79813e14608 100644 --- a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php +++ b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php @@ -45,7 +45,7 @@ public function testUserAttributesInMarkup() { $authors = [ $this->drupalCreateUser([], $this->randomMachineName(30)), $this->drupalCreateUser([], $this->randomMachineName(20)), - $this->drupalCreateUser([], $this->randomMachineName(5)) + $this->drupalCreateUser([], $this->randomMachineName(5)), ]; $this->drupalLogin($user1); diff --git a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php index 3a709519d09e3af4bee516aafb55df47bbd67995..5a3181a4eb992d473a96b4ed5cbc58da18707e31 100644 --- a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php +++ b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php @@ -259,7 +259,7 @@ public function save(array $form, FormStateInterface $form_state) { 'image_mapping' => [ 'sizes' => $image_style_mapping['sizes'], 'sizes_image_styles' => array_keys(array_filter($image_style_mapping['sizes_image_styles'])), - ] + ], ]; $responsive_image_style->addImageStyleMapping($breakpoint_id, $multiplier, $mapping); } diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php index 04efb7b803713bd4bcc058564890b0747ac84a36..3828ab0d75e918f26c7fe7565706100749f55133 100644 --- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php +++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php @@ -51,7 +51,7 @@ protected function setUp() { 'create article content', 'edit any article content', 'delete any article content', - 'administer image styles' + 'administer image styles', ]); $this->drupalLogin($this->adminUser); // Add responsive image style. diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldUiTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldUiTest.php index c879e72c7e512ea93ee657d461d3e08526852c5d..2069f61368f14f8804da50c7e39a523fb8e6afd5 100644 --- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldUiTest.php +++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldUiTest.php @@ -77,7 +77,7 @@ public function testResponsiveImageFormatterUI() { ]) ->addImageStyleMapping('responsive_image_test_module.narrow', '1x', [ 'image_mapping_type' => 'image_style', - 'image_mapping' => 'medium' + 'image_mapping' => 'medium', ]) // Test the normal output of mapping to an image style. ->addImageStyleMapping('responsive_image_test_module.wide', '1x', [ diff --git a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php index 0c64b05ed8575c8d226a417a80869715ed17e0e7..f45c927e332184f1e74fb714d1b98ce41a82cb60 100644 --- a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php +++ b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php @@ -248,7 +248,7 @@ public function testGetKeyedImageStyleMappings() { 'image_mapping_type' => 'image_style', 'image_mapping' => '_original image_', ], - ] + ], ]; $this->assertEquals($expected, $entity->getKeyedImageStyleMappings()); diff --git a/core/modules/rest/rest.post_update.php b/core/modules/rest/rest.post_update.php index 6d45178804bb4aded4726c5076bdd15eaa13268f..8ed5a6dbff124f821c031a24e2ca98c7800da0ab 100644 --- a/core/modules/rest/rest.post_update.php +++ b/core/modules/rest/rest.post_update.php @@ -53,7 +53,7 @@ function rest_post_update_resource_granularity() { $resource_config_entity->set('configuration', [ 'methods' => array_keys($configuration), 'formats' => $configuration[$first_method]['supported_formats'], - 'authentication' => $configuration[$first_method]['supported_auth'] + 'authentication' => $configuration[$first_method]['supported_auth'], ]); $resource_config_entity->set('granularity', RestResourceConfigInterface::RESOURCE_GRANULARITY); $resource_config_entity->save(); diff --git a/core/modules/rest/src/Entity/RestResourceConfig.php b/core/modules/rest/src/Entity/RestResourceConfig.php index 47faa01e0d9e1e800e1c5eec2ffad1818cd2781f..c0a4e5c04c7c538d2cd15e088a4b75c77a309dac 100644 --- a/core/modules/rest/src/Entity/RestResourceConfig.php +++ b/core/modules/rest/src/Entity/RestResourceConfig.php @@ -210,7 +210,7 @@ protected function getFormatsForMethodGranularity($method) { */ public function getPluginCollections() { return [ - 'resource' => new DefaultSingleLazyPluginCollection($this->getResourcePluginManager(), $this->plugin_id, []) + 'resource' => new DefaultSingleLazyPluginCollection($this->getResourcePluginManager(), $this->plugin_id, []), ]; } diff --git a/core/modules/rest/src/Tests/RESTTestBase.php b/core/modules/rest/src/Tests/RESTTestBase.php index f6046133e33ddbcbd6df723da3289312009e7d15..66be4b29eaadfb16db0c996c4f657d691f1c9d5f 100644 --- a/core/modules/rest/src/Tests/RESTTestBase.php +++ b/core/modules/rest/src/Tests/RESTTestBase.php @@ -383,7 +383,7 @@ protected function enableService($resource_type, $method = 'GET', $format = NULL $resource_config = $this->resourceConfigStorage->create([ 'id' => $resource_config_id, 'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY, - 'configuration' => [] + 'configuration' => [], ]); } $configuration = $resource_config->get('configuration'); diff --git a/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php b/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php index 17a69d537887b9716787894bbcf6e24a60c8d11a..ac9b19119cab8d0fb8740203c0220324bc46ec73 100644 --- a/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php +++ b/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php @@ -54,6 +54,6 @@ ->fields([ 'name' => 'rest.settings', 'data' => serialize($config), - 'collection' => '' + 'collection' => '', ]) ->execute(); diff --git a/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php b/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php index 15acff94094f95177faeed1c293a00ec6d6e3a2b..c20ba9531d4e35b2da400d5f484a00c9113e4409 100644 --- a/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php +++ b/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php @@ -53,6 +53,6 @@ ->fields([ 'name' => 'rest.settings', 'data' => serialize($config), - 'collection' => '' + 'collection' => '', ]) ->execute(); diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php index 0c82ea95a28d05116f3a310c8a7a441d17984d09..94384fffa525625a1ef0411a6e4df06668c97f71 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php @@ -84,8 +84,8 @@ protected function getExpectedNormalizedEntity() { $normalization = [ 'uuid' => [ [ - 'value' => $this->entity->uuid() - ] + 'value' => $this->entity->uuid(), + ], ], 'id' => [ [ @@ -100,15 +100,15 @@ protected function getExpectedNormalizedEntity() { 'type' => [ [ 'value' => 'entity_test', - ] + ], ], 'name' => [ [ 'value' => 'Llama', - ] + ], ], 'created' => [ - $this->formatExpectedTimestampItemValues((int) $this->entity->get('created')->value) + $this->formatExpectedTimestampItemValues((int) $this->entity->get('created')->value), ], 'user_id' => [ [ @@ -116,7 +116,7 @@ protected function getExpectedNormalizedEntity() { 'target_type' => 'user', 'target_uuid' => $author->uuid(), 'url' => $author->toUrl()->toString(), - ] + ], ], 'field_test_text' => [], ]; diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php index cd8654df4d81e4589336748b2883a94320c541df..1108832f1d0cd9f7ed63360c08c82910576a0bd0 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php @@ -123,7 +123,7 @@ protected function getExpectedCacheTags() { 'foo:bar', 'foo:baz', // The cache tags set by the filter_test_cache_merge filter. - 'merge:tag' + 'merge:tag', ], parent::getExpectedCacheTags()); } diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php index a89bde1b69e0cd22e4f97732b580a5b6b568bdcd..7dce3a2c3e179c5d1d662343e8c4019c7b4ac5a6 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php @@ -76,33 +76,33 @@ protected function getExpectedNormalizedEntity() { return [ 'uuid' => [ [ - 'value' => 'abcdefg' - ] + 'value' => 'abcdefg', + ], ], 'fid' => [ [ - 'value' => 1 - ] + 'value' => 1, + ], ], 'langcode' => [ [ - 'value' => 'en' - ] + 'value' => 'en', + ], ], 'url' => [ [ - 'value' => 'http://example.com/rss.xml' - ] + 'value' => 'http://example.com/rss.xml', + ], ], 'title' => [ [ - 'value' => 'Feed' - ] + 'value' => 'Feed', + ], ], 'refresh' => [ [ - 'value' => 900 - ] + 'value' => 900, + ], ], 'checked' => [ $this->formatExpectedTimestampItemValues(123456789), @@ -112,28 +112,28 @@ protected function getExpectedNormalizedEntity() { ], 'link' => [ [ - 'value' => 'http://example.com' - ] + 'value' => 'http://example.com', + ], ], 'description' => [ [ - 'value' => 'Feed Resource Test 1' - ] + 'value' => 'Feed Resource Test 1', + ], ], 'image' => [ [ - 'value' => 'http://example.com/feed_logo' - ] + 'value' => 'http://example.com/feed_logo', + ], ], 'hash' => [ [ - 'value' => 'abcdefg' - ] + 'value' => 'abcdefg', + ], ], 'etag' => [ [ - 'value' => 'hijklmn' - ] + 'value' => 'hijklmn', + ], ], 'modified' => [ $this->formatExpectedTimestampItemValues(123456789), @@ -148,23 +148,23 @@ protected function getNormalizedPostEntity() { return [ 'title' => [ [ - 'value' => 'Feed Resource Post Test' - ] + 'value' => 'Feed Resource Post Test', + ], ], 'url' => [ [ - 'value' => 'http://example.com/feed' - ] + 'value' => 'http://example.com/feed', + ], ], 'refresh' => [ [ - 'value' => 900 - ] + 'value' => 900, + ], ], 'description' => [ [ - 'value' => 'Feed Resource Post Test Description' - ] + 'value' => 'Feed Resource Post Test Description', + ], ], ]; } diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php index ce6090419e487f5f74fc4d67a28fcfbb7a43531c..5720dacc68817dbf646be878e3266dc0f9dd62b0 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php @@ -334,16 +334,16 @@ public function testGetTermWithParent(array $parent_term_ids) { public function providerTestGetTermWithParent() { return [ 'root parent: [0] (= no parent)' => [ - [0] + [0], ], 'non-root parent: [2]' => [ - [2] + [2], ], 'multiple parents: [0,2] (root + non-root parent)' => [ - [0, 2] + [0, 2], ], 'multiple parents: [3,2] (both non-root parents)' => [ - [3, 2] + [3, 2], ], ]; } diff --git a/core/modules/rest/tests/src/Functional/ResourceTest.php b/core/modules/rest/tests/src/Functional/ResourceTest.php index 1e8babe0db20aa9cbad1184c87c8f8b23372cbdb..d04b990e60fee893b62c823e7fa7c04ac5bb45bd 100644 --- a/core/modules/rest/tests/src/Functional/ResourceTest.php +++ b/core/modules/rest/tests/src/Functional/ResourceTest.php @@ -121,7 +121,7 @@ public function testSerializationClassIsOptional() { ], 'supported_auth' => [ 'cookie', - ] + ], ], ], ])->save(); diff --git a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php index 6de1ec97ce12279ea4ba2f6cce1edf93e479110b..b60eb0c3f2a2627748e6dcc0d3bee306a6cb8b08 100644 --- a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php +++ b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php @@ -296,7 +296,7 @@ public function testRestRenderCaching() { 'entity_test:7', 'entity_test:8', 'entity_test:9', - 'entity_test_list' + 'entity_test_list', ]; $cache_contexts = [ 'entity_test_view_grants', diff --git a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php index c885990ff7414fe4ecba2bb566720840572c57cd..500f375ef95b40c0868bbb9340cfe65262032d3b 100644 --- a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php +++ b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php @@ -239,7 +239,7 @@ public function providerOnDependencyRemovalForResourceGranularity() { 'methods' => ['GET', 'POST'], 'formats' => ['json'], 'authentication' => ['cookie', 'basic_auth'], - ] + ], ], 'resource with only HAL+JSON format' => [ [ @@ -252,7 +252,7 @@ public function providerOnDependencyRemovalForResourceGranularity() { ], ], 'hal', - FALSE + FALSE, ], 'resource with multiple authentication providers' => [ [ @@ -269,7 +269,7 @@ public function providerOnDependencyRemovalForResourceGranularity() { 'methods' => ['GET', 'POST'], 'formats' => ['json', 'hal_json'], 'authentication' => ['cookie'], - ] + ], ], 'resource with only basic_auth authentication' => [ [ diff --git a/core/modules/search/search.module b/core/modules/search/search.module index d2560dffcc31b32a5a318e0a6b158f5320332680..c7707fd51c9927df15baaefb29df10c71710b10d 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -797,7 +797,7 @@ function search_excerpt($keys, $text, $langcode = NULL) { $text = trim(preg_replace('/' . $preceded_by_boundary . '(?:' . implode('|', $keys) . ')' . $followed_by_boundary . '/iu', '\0', ' ' . $text . ' ')); return [ '#markup' => $text, - '#allowed_tags' => ['strong'] + '#allowed_tags' => ['strong'], ]; } diff --git a/core/modules/search/src/SearchPageListBuilder.php b/core/modules/search/src/SearchPageListBuilder.php index 9442b6961394228d8bd16ce919a3b8a753092a1e..bde195ec638edc3c33abbf7a773ad9bcfd9db971 100644 --- a/core/modules/search/src/SearchPageListBuilder.php +++ b/core/modules/search/src/SearchPageListBuilder.php @@ -157,7 +157,7 @@ public function buildRow(EntityInterface $entity) { $status = $entity->getPlugin()->indexStatus(); $row['progress']['#markup'] = $this->t('%num_indexed of %num_total indexed', [ '%num_indexed' => $status['total'] - $status['remaining'], - '%num_total' => $status['total'] + '%num_total' => $status['total'], ]); } else { @@ -227,7 +227,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#open' => TRUE, ]; $form['indexing_settings']['info'] = [ - '#markup' => $this->t("

                Search pages that use an index may use the default index provided by the Search module, or they may use a different indexing mechanism. These settings are for the default index. Changing these settings will cause the default search index to be rebuilt to reflect the new settings. Searching will continue to work, based on the existing index, but new content won't be indexed until all existing content has been re-indexed.

                The default settings should be appropriate for the majority of sites.

                ") + '#markup' => $this->t("

                Search pages that use an index may use the default index provided by the Search module, or they may use a different indexing mechanism. These settings are for the default index. Changing these settings will cause the default search index to be rebuilt to reflect the new settings. Searching will continue to work, based on the existing index, but new content won't be indexed until all existing content has been re-indexed.

                The default settings should be appropriate for the majority of sites.

                "), ]; $form['indexing_settings']['minimum_word_size'] = [ '#type' => 'number', @@ -241,7 +241,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#type' => 'checkbox', '#title' => $this->t('Simple CJK handling'), '#default_value' => $search_settings->get('index.overlap_cjk'), - '#description' => $this->t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.') + '#description' => $this->t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.'), ]; // Indexing settings: diff --git a/core/modules/search/src/Tests/SearchPageCacheTagsTest.php b/core/modules/search/src/Tests/SearchPageCacheTagsTest.php index 55adf976e8f8e23acf6cb250df3ac4cb5082d88e..0ea0e9460d3a8b5d5f023b8588f06fc878d8e521 100644 --- a/core/modules/search/src/Tests/SearchPageCacheTagsTest.php +++ b/core/modules/search/src/Tests/SearchPageCacheTagsTest.php @@ -153,7 +153,7 @@ public function testSearchTagsBubbling() { // reference field. $edit = [ 'title[0][value]' => 'Llama shop', - 'field_test__ref[0][target_id]' => $this->node->getTitle() + 'field_test__ref[0][target_id]' => $this->node->getTitle(), ]; $this->drupalPostForm('node/add/' . $type->id(), $edit, t('Save')); diff --git a/core/modules/search/tests/src/Kernel/SearchMatchTest.php b/core/modules/search/tests/src/Kernel/SearchMatchTest.php index 7037646bc8636f52121b149665cdebccfbc05c16..e9d2ac8bca5bf61299fe0fff30d96d8ac62e884f 100644 --- a/core/modules/search/tests/src/Kernel/SearchMatchTest.php +++ b/core/modules/search/tests/src/Kernel/SearchMatchTest.php @@ -156,7 +156,7 @@ public function _testQueries() { '"am minim veniam" -"cillum dolore"' => [5, 6], '"am minim veniam" -"dolore cillum"' => [5, 6, 7], 'xxxxx "minim am veniam es" OR dolore' => [], - 'xx "minim am veniam es" OR dolore' => [] + 'xx "minim am veniam es" OR dolore' => [], ]; foreach ($queries as $query => $results) { $result = db_select('search_index', 'i') diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php index a1e01e64e5700c54d3d07c42589b99771cfc19eb..5861d99838e97ff5c50050efbd185ed76aa8f498 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php @@ -28,7 +28,7 @@ class ShortcutTranslationUITest extends ContentTranslationUITestBase { 'content_translation', 'link', 'shortcut', - 'toolbar' + 'toolbar', ]; /** diff --git a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php index 9f8fd3ae66d957895fa21239c20484b3c8c1dc4c..4435e81b2fe0f5b3dbcb071f1ccbf007267f6583 100644 --- a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php +++ b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php @@ -52,7 +52,7 @@ public function providerSource() { 'p8' => '0', 'p9' => '0', 'updated' => '0', - ] + ], ]; // The expected results. diff --git a/core/modules/simpletest/src/Form/SimpletestResultsForm.php b/core/modules/simpletest/src/Form/SimpletestResultsForm.php index f24727c6f3f55e5b8e6aa1ffa80eeff5c5b3806c..a2241571eb4e00775024bed10cddaa6cfda6db14 100644 --- a/core/modules/simpletest/src/Form/SimpletestResultsForm.php +++ b/core/modules/simpletest/src/Form/SimpletestResultsForm.php @@ -290,7 +290,7 @@ public static function addResultForm(array &$form, array $results) { 'Filename', 'Line', 'Function', - ['colspan' => 2, 'data' => 'Status'] + ['colspan' => 2, 'data' => 'Status'], ]; $form['result']['results'] = []; foreach ($test_results as $group => $assertions) { diff --git a/core/modules/simpletest/src/Tests/KernelTestBaseTest.php b/core/modules/simpletest/src/Tests/KernelTestBaseTest.php index 1e9e75da0b91a47ee38527c75aa50d86fca4b092..7131041d15786f7dd680f456d25ebed45b6e2030 100644 --- a/core/modules/simpletest/src/Tests/KernelTestBaseTest.php +++ b/core/modules/simpletest/src/Tests/KernelTestBaseTest.php @@ -278,7 +278,7 @@ public function testEnableModulesFixedList() { $field_storage = FieldStorageConfig::create([ 'field_name' => 'test_field', 'entity_type' => 'entity_test', - 'type' => 'test_field' + 'type' => 'test_field', ]); $field_storage->save(); FieldConfig::create([ @@ -354,7 +354,7 @@ public function run(array $methods = []) { $info = Database::getConnectionInfo(); $connection->query('ATTACH DATABASE :database AS :prefix', [ ':database' => $info['default']['database'] . '-' . $this->databasePrefix, - ':prefix' => $this->databasePrefix + ':prefix' => $this->databasePrefix, ]); $result = $connection->query("SELECT name FROM " . $this->databasePrefix . ".sqlite_master WHERE type = :type AND name LIKE :table_name AND name NOT LIKE :pattern", [ diff --git a/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php b/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php index d62cc48a3ea3220f371c7855d3058c071369f2c9..d6fe19964a09f0eda764906154f7c462fcde1332 100644 --- a/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php +++ b/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php @@ -30,7 +30,7 @@ protected function setUp() { protected function checkRequirements() { if ($this->isInChildSite()) { return [ - 'Test is not allowed to run.' + 'Test is not allowed to run.', ]; } return parent::checkRequirements(); diff --git a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php index bb9da9411a6bac2353d70d92ea5a77ebc2e33d7e..957391db76c480155eab42d320cc8feddefe5751 100644 --- a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php @@ -59,7 +59,7 @@ public function testInternalBrowser() { $this->maximumRedirects = 1; $edit = [ 'name' => $user->getUsername(), - 'pass' => $user->pass_raw + 'pass' => $user->pass_raw, ]; $this->drupalPostForm('user/login', $edit, t('Log in'), [ 'query' => ['destination' => 'user/logout'], diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index ab2e5e211b97c627c8047ce5c8d8924a4c01862d..83cf00e2699befdc6840af6bb2637849db767bfe 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -286,7 +286,7 @@ protected function drupalLogin(AccountInterface $account) { $edit = [ 'name' => $account->getUsername(), - 'pass' => $account->pass_raw + 'pass' => $account->pass_raw, ]; $this->drupalPostForm('user/login', $edit, t('Log in')); @@ -660,7 +660,7 @@ protected function curlExec($curl_options, $redirect = FALSE) { '@method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), '@url' => isset($original_url) ? $original_url : $url, '@status' => $status, - '@length' => format_size(strlen($this->getRawContent())) + '@length' => format_size(strlen($this->getRawContent())), ]; $message = new FormattableMarkup('@method @url returned @status (@length).', $message_vars); $this->assertTrue($this->getRawContent() !== FALSE, $message, 'Browser'); diff --git a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php index f0ac482d381d8594c58efb63b9c8bc599e4ae26f..efdb72a6cd8e1bc7a9b0498c5773fe3d51d9cd49 100644 --- a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php +++ b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php @@ -95,7 +95,7 @@ public function defaultConfiguration() { return [ 'top_day_num' => 0, 'top_all_num' => 0, - 'top_last_num' => 0 + 'top_last_num' => 0, ]; } diff --git a/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php b/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php index 787c35bff2a40faf8157b3a9c2c0a50e04ef3ba6..90a62093b61da89182d6a2fc729279d3c6144f14 100644 --- a/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php +++ b/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php @@ -46,7 +46,7 @@ public function testAttached() { $node = Node::create([ 'type' => 'page', 'title' => 'Page node', - 'body' => 'body text' + 'body' => 'body text', ]); $node->save(); $this->drupalGet('node/' . $node->id()); diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php index 214e28dd95770b68fd3a2d9310905532c5cbd9b1..25a2a708918601f5720c6150924a28235c4276ac 100644 --- a/core/modules/system/src/Controller/DbUpdateController.php +++ b/core/modules/system/src/Controller/DbUpdateController.php @@ -524,7 +524,7 @@ public function requirements($severity, array $requirements, Request $request) { $build['status_report'] = [ '#type' => 'status_report', '#requirements' => $requirements, - '#suffix' => $this->t('Check the messages and try again.', [':url' => $try_again_url]) + '#suffix' => $this->t('Check the messages and try again.', [':url' => $try_again_url]), ]; $build['#title'] = $this->t('Requirements problem'); diff --git a/core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php b/core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php index 8641cbc3eed150607250356b5750517c38f19da8..8531653247b51cbd0212f67a6f08a0543bf4963b 100644 --- a/core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php +++ b/core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php @@ -159,7 +159,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $entity_t '@entity_type_singular' => $entity_type->getSingularLabel(), '@entity_type_plural' => $entity_type->getPluralLabel(), ] - ) + ), ]; } diff --git a/core/modules/system/src/Form/RegionalForm.php b/core/modules/system/src/Form/RegionalForm.php index 9ade9380124b10a8df9508e7c899aeb032093760..ccd880ace075c627d6cf0bb93de279ed589e55ac 100644 --- a/core/modules/system/src/Form/RegionalForm.php +++ b/core/modules/system/src/Form/RegionalForm.php @@ -125,7 +125,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#type' => 'checkbox', '#title' => t('Remind users at login if their time zone is not set'), '#default_value' => $system_date->get('timezone.user.warn'), - '#description' => t('Only applied if users may set their own time zone.') + '#description' => t('Only applied if users may set their own time zone.'), ]; $form['timezone']['configurable_timezones_wrapper']['user_default_timezone'] = [ @@ -137,7 +137,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { DRUPAL_USER_TIMEZONE_EMPTY => t('Empty time zone'), DRUPAL_USER_TIMEZONE_SELECT => t('Users may set their own time zone at registration'), ], - '#description' => t('Only applied if users may set their own time zone.') + '#description' => t('Only applied if users may set their own time zone.'), ]; return parent::buildForm($form, $form_state); diff --git a/core/modules/system/src/Form/RssFeedsForm.php b/core/modules/system/src/Form/RssFeedsForm.php index d7508e63fcea93714853d573e013839b206ce73b..95c7b42d665dc9499ccb9a833b681d1e8e30a9a6 100644 --- a/core/modules/system/src/Form/RssFeedsForm.php +++ b/core/modules/system/src/Form/RssFeedsForm.php @@ -35,7 +35,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#type' => 'textarea', '#title' => t('Feed description'), '#default_value' => $rss_config->get('channel.description'), - '#description' => t('Description of your site, included in each feed.') + '#description' => t('Description of your site, included in each feed.'), ]; $options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30]; $form['feed_default_items'] = [ @@ -43,7 +43,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#title' => t('Number of items in each feed'), '#default_value' => $rss_config->get('items.limit'), '#options' => array_combine($options, $options), - '#description' => t('Default number of items to include in each feed.') + '#description' => t('Default number of items to include in each feed.'), ]; $form['feed_view_mode'] = [ '#type' => 'select', @@ -54,7 +54,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 'teaser' => t('Titles plus teaser'), 'fulltext' => t('Full text'), ], - '#description' => t('Global setting for the default display of content items in each feed.') + '#description' => t('Global setting for the default display of content items in each feed.'), ]; return parent::buildForm($form, $form_state); diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php index aeecb989f721300eb21240a9c0c76d5ce8e43db1..907e5ce3d2de1434d102de360a3b94c34a5433dd 100644 --- a/core/modules/system/src/Form/ThemeSettingsForm.php +++ b/core/modules/system/src/Form/ThemeSettingsForm.php @@ -136,11 +136,11 @@ public function buildForm(array $form, FormStateInterface $form_state, $theme = $form['var'] = [ '#type' => 'hidden', - '#value' => $var + '#value' => $var, ]; $form['config_key'] = [ '#type' => 'hidden', - '#value' => $config_key + '#value' => $config_key, ]; // Toggle settings diff --git a/core/modules/system/src/Tests/Ajax/DialogTest.php b/core/modules/system/src/Tests/Ajax/DialogTest.php index 90c548b6303d862c035987f763af96dd8a0f7f94..76ab6fb160f5bc9b1c97cdf5b82fff61a14896fe 100644 --- a/core/modules/system/src/Tests/Ajax/DialogTest.php +++ b/core/modules/system/src/Tests/Ajax/DialogTest.php @@ -114,7 +114,7 @@ public function testDialog() { ], [], 'ajax-test/dialog-contents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_dialog']], [], NULL, [ 'submit' => [ 'dialogOptions[target]' => 'ajax-test-dialog-wrapper-1', - ] + ], ]); $this->assertEqual($normal_expected_response, $ajax_result[3], 'Normal dialog JSON response matches.'); @@ -126,7 +126,7 @@ public function testDialog() { 'textfield' => 'test', ], [], 'ajax-test/dialog-contents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_dialog']], [], NULL, [ // Don't send a target. - 'submit' => [] + 'submit' => [], ]); // Make sure the selector ID starts with the right string. $this->assert(strpos($ajax_result[3]['selector'], $no_target_expected_response['selector']) === 0, 'Selector starts with right string.'); diff --git a/core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php b/core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php index 9af773b86cda026f7f2ef66680376f39ed282dd3..5ad960a9f0ba666fa6cbd5e0967e3cd4a8a8c58c 100644 --- a/core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php +++ b/core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php @@ -74,7 +74,7 @@ protected function error($message = '', $group = 'Other', array $caller = NULL) $this->collectedErrors[] = [ 'message' => $message, 'group' => $group, - 'caller' => $caller + 'caller' => $caller, ]; } } diff --git a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php index bb57c31ba128c50ca782023d2ccc493a15a05ccc..41fd896dfe10df76852a52fcf1df6d7022cbf1e9 100644 --- a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php +++ b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php @@ -51,23 +51,23 @@ public function sampleUrlAliases() { [ 'source' => '/node/1', 'alias' => '/alias_for_node_1_en', - 'langcode' => 'en' + 'langcode' => 'en', ], [ 'source' => '/node/2', 'alias' => '/alias_for_node_2_en', - 'langcode' => 'en' + 'langcode' => 'en', ], [ 'source' => '/node/1', 'alias' => '/alias_for_node_1_fr', - 'langcode' => 'fr' + 'langcode' => 'fr', ], [ 'source' => '/node/1', 'alias' => '/alias_for_node_1_und', - 'langcode' => 'und' - ] + 'langcode' => 'und', + ], ]; } diff --git a/core/modules/system/src/Tests/Session/SessionTest.php b/core/modules/system/src/Tests/Session/SessionTest.php index 1be9561b36f75f3d5ad3d167871ee51b677a1a40..0f219c5036b5c1c162008e0ff8f603cfb70536aa 100644 --- a/core/modules/system/src/Tests/Session/SessionTest.php +++ b/core/modules/system/src/Tests/Session/SessionTest.php @@ -57,7 +57,7 @@ public function testSessionSaveRegenerate() { // session_test_user_login() which breaks a normal assertion. $edit = [ 'name' => $user->getUsername(), - 'pass' => $user->pass_raw + 'pass' => $user->pass_raw, ]; $this->drupalPostForm('user/login', $edit, t('Log in')); $this->drupalGet('user'); diff --git a/core/modules/system/src/Tests/System/HtaccessTest.php b/core/modules/system/src/Tests/System/HtaccessTest.php index fab7a37a34d64c45ace5de73b8b25773b13394f0..ab1840c65508f074319e2dbe65fdda95edd5b1bb 100644 --- a/core/modules/system/src/Tests/System/HtaccessTest.php +++ b/core/modules/system/src/Tests/System/HtaccessTest.php @@ -75,7 +75,7 @@ protected function getProtectedFiles() { // Test extensions that should be permitted. $file_exts_to_allow = [ - 'php-info.txt' + 'php-info.txt', ]; foreach ($file_exts_to_allow as $file_ext) { @@ -108,7 +108,7 @@ public function testFileAccess() { $node = $this->drupalCreateNode([ 'title' => 'This is a node', 'type' => $type->id(), - 'path' => '/test.php' + 'path' => '/test.php', ]); $node->save(); $this->drupalGet('test.php'); diff --git a/core/modules/system/src/Tests/Theme/FunctionsTest.php b/core/modules/system/src/Tests/Theme/FunctionsTest.php index ca40577cc6cdf14c3b08d2c20d6af815f7cf6d3a..6cc28fef17c06a7814b3aca42bacd0c3000a1f78 100644 --- a/core/modules/system/src/Tests/Theme/FunctionsTest.php +++ b/core/modules/system/src/Tests/Theme/FunctionsTest.php @@ -209,7 +209,7 @@ public function testLinks() { 'url' => Url::fromRoute('router_test.1'), 'query' => [ 'key' => 'value', - ] + ], ], ]; @@ -330,7 +330,7 @@ public function testIndexedKeyedLinks() { 'url' => Url::fromRoute('router_test.1'), 'query' => [ 'key' => 'value', - ] + ], ], ]; diff --git a/core/modules/system/src/Tests/Theme/TwigTransTest.php b/core/modules/system/src/Tests/Theme/TwigTransTest.php index b73cdaf0c24e5f8669bec020b699d0714c86b2e3..5cd34b6bd9ec51c3513c1bb82871d9f0f5c3197f 100644 --- a/core/modules/system/src/Tests/Theme/TwigTransTest.php +++ b/core/modules/system/src/Tests/Theme/TwigTransTest.php @@ -21,7 +21,7 @@ class TwigTransTest extends WebTestBase { 'theme_test', 'twig_theme_test', 'locale', - 'language' + 'language', ]; /** @@ -56,7 +56,7 @@ protected function setUp() { 'administer languages', 'access administration pages', 'administer site configuration', - 'translate interface' + 'translate interface', ]); $this->drupalLogin($this->adminUser); diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 7951ecd21f8cfd2a928e42368774d3ecdc49a262..ca1e02c9864fda97bf97f4c6f4d1246075597a12 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -27,7 +27,7 @@ function hook_system_themes_page_alter(&$theme_groups) { $theme->operations[] = [ 'title' => t('Foo'), 'url' => Url::fromRoute('system.themes_page'), - 'query' => ['theme' => $theme->getName()] + 'query' => ['theme' => $theme->getName()], ]; } } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index a7f964539f2c707b0cf8f93aaae062d766798db3..2ab05c5d80c5db956dc2acb1171dfa634f955f6c 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -51,10 +51,10 @@ function system_requirements($phase) { 'value' => t('%profile_name (%profile-%version)', [ '%profile_name' => $info['name'], '%profile' => $profile, - '%version' => $info['version'] + '%version' => $info['version'], ]), 'severity' => REQUIREMENT_INFO, - 'weight' => -9 + 'weight' => -9, ]; } diff --git a/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php b/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php index cb35676899473f7eabb67ddc5f9a3019ddb3b335..c19c6bb6646b1033ab9a3ba8c6c3e464ee89223f 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php @@ -47,7 +47,7 @@ $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2354889', 'block.block.secondtestfor2354889', 'block.block.thirdtestfor2354889'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2354889', 'block.block.secondtestfor2354889', 'block.block.thirdtestfor2354889'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:bartik') diff --git a/core/modules/system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php b/core/modules/system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php index 6cf44b1743965d333c249f8eedbf2bc1e0675b30..0fa97e44f64025f5f547ccfe9792f437eb58f2a9 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php @@ -40,7 +40,7 @@ $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.seven_local_actions'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.seven_local_actions'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:seven') @@ -55,7 +55,7 @@ $extensions = unserialize($extensions); $connection->update('config') ->fields([ - 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])) + 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])), ]) ->condition('name', 'core.extension') ->execute(); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.page-title-into-block-2476947.php b/core/modules/system/tests/fixtures/update/drupal-8.page-title-into-block-2476947.php index 766e9a6037fb012595a1133e9db2f28d99619412..b51dbe8a0a32a099d033e65a8812110385a92137 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.page-title-into-block-2476947.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.page-title-into-block-2476947.php @@ -40,7 +40,7 @@ $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_page_title'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_page_title'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:bartik') @@ -55,7 +55,7 @@ $extensions = unserialize($extensions); $connection->update('config') ->fields([ - 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])) + 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])), ]) ->condition('name', 'core.extension') ->execute(); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php b/core/modules/system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php index 63582dc389007c8646e648eb8dd2a1904eba2e82..97c1b7bd993ba04b85d8f5f0f357df8dce06a9ce 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php @@ -40,7 +40,7 @@ $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.seven_secondary_local_tasks'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.seven_secondary_local_tasks'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:seven') diff --git a/core/modules/system/tests/fixtures/update/drupal-8.site-branding-into-block-2005546.php b/core/modules/system/tests/fixtures/update/drupal-8.site-branding-into-block-2005546.php index cd593723c9f984e65f1aad0be74fcd5fe22f9d47..050dd38271ccf9e03882e47e38b0cf7b5d4d7b40 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.site-branding-into-block-2005546.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.site-branding-into-block-2005546.php @@ -40,7 +40,7 @@ $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_branding'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_branding'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:bartik') @@ -55,7 +55,7 @@ $extensions = unserialize($extensions); $connection->update('config') ->fields([ - 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])) + 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])), ]) ->condition('name', 'core.extension') ->execute(); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php b/core/modules/system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php index 7b658b417841039cb4b36decd59ff6e5995807dc..537ecf1bac348ecef8365ca7e39479f2e2cde85a 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php @@ -19,7 +19,7 @@ $extensions = unserialize($extensions); $connection->update('config') ->fields([ - 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_stable' => 0]])) + 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_stable' => 0]])), ]) ->condition('name', 'core.extension') ->execute(); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php b/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php index fa394473d731f741e108fc2820994987fdbc4a11..cf5f9dfebeb2269edb56fe97c4b2e932aee0d32f 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php @@ -43,7 +43,7 @@ $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2513534', 'block.block.secondtestfor2513534'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2513534', 'block.block.secondtestfor2513534'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:bartik') diff --git a/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php b/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php index 5ba65e8013a66ed372158617e17430f1ba7f8ffc..a34d288ff80d7117fc51b87433ce706516fd5da3 100644 --- a/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php +++ b/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php @@ -139,7 +139,7 @@ public function dialog() { 'data-dialog-type' => 'modal', 'data-dialog-options' => json_encode([ 'width' => 400, - ]) + ]), ], ], 'link3' => [ @@ -151,7 +151,7 @@ public function dialog() { 'data-dialog-options' => json_encode([ 'target' => 'ajax-test-dialog-wrapper-1', 'width' => 800, - ]) + ]), ], ], 'link4' => [ @@ -179,7 +179,7 @@ public function dialog() { 'data-dialog-options' => json_encode([ 'width' => 800, 'height' => 500, - ]) + ]), ], ], 'link7' => [ @@ -190,7 +190,7 @@ public function dialog() { 'data-dialog-type' => 'dialog', 'data-dialog-options' => json_encode([ 'width' => 800, - ]) + ]), ], ], 'link8' => [ diff --git a/core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php b/core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php index eafe8a98a7a160daefe544afaee537f4dc88f785..a0b606067248c31202cfa60aceedaeb1e4d94c99 100644 --- a/core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php +++ b/core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php @@ -31,7 +31,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { // to have a dummy field we can set in WebTestBase::drupalPostForm() else it won't // submit anything. $form['textfield'] = [ - '#type' => 'hidden' + '#type' => 'hidden', ]; $form['button1'] = [ '#type' => 'submit', diff --git a/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php b/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php index 1d34f8a4592b868e5eb46f445cff6f6f21f7d363..9a5951e6d3968750c825caadfb6a28172d243336 100644 --- a/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php +++ b/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php @@ -19,7 +19,7 @@ public function testRedirect() { return [ 'success' => [ '#markup' => 'Redirection successful.', - ] + ], ]; } @@ -103,7 +103,7 @@ public function testProgrammatic($value = 1) { return [ 'success' => [ '#markup' => 'Got out of a programmatic batched form.', - ] + ], ]; } diff --git a/core/modules/system/tests/modules/database_test/database_test.install b/core/modules/system/tests/modules/database_test/database_test.install index b4e3ca5632558fb4337c03d5b523791b9684b063..a5450b1064870e33e3ed183a2d17ee3258b16899 100644 --- a/core/modules/system/tests/modules/database_test/database_test.install +++ b/core/modules/system/tests/modules/database_test/database_test.install @@ -47,7 +47,7 @@ function database_test_schema() { ], 'primary key' => ['id'], 'unique keys' => [ - 'name' => ['name'] + 'name' => ['name'], ], 'indexes' => [ 'ages' => ['age'], @@ -148,7 +148,7 @@ function database_test_schema() { ], 'blob2' => [ 'description' => 'A second BLOB field.', - 'type' => 'blob' + 'type' => 'blob', ], ], 'primary key' => ['id'], @@ -212,7 +212,7 @@ function database_test_schema() { ], 'primary key' => ['id'], 'unique keys' => [ - 'name' => ['name'] + 'name' => ['name'], ], 'indexes' => [ 'ages' => ['age'], @@ -242,7 +242,7 @@ function database_test_schema() { ], 'primary key' => ['id'], 'unique keys' => [ - 'name' => ['name'] + 'name' => ['name'], ], ]; diff --git a/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php index 9ba11b7733e7f942d5ecd0dfeabe276ba1b3c61b..2a6b83965ec9fae499a3974541c6cc7de332df31 100644 --- a/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php +++ b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php @@ -62,7 +62,7 @@ public function renderArray() { '#pre_render' => [function () { $elements = $this->earlyRenderContent(); return $elements; - } + }, ], ]; } diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module index d7dc6351467c4b1a780abaa8a05a767d049f89f6..f98ae10b0440aeb9277f1711ca7bb3be0bcdf494 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.module +++ b/core/modules/system/tests/modules/entity_test/entity_test.module @@ -306,7 +306,7 @@ function entity_test_entity_extra_field_info() { 'description' => t('An extra field on the display side, hidden by default.'), 'visible' => FALSE, ], - ] + ], ]; return $extra; diff --git a/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php b/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php index ae5dd3039d9d075ae5d63da8d051d9871b6d2fc9..6283bc3cea9ca9b9430239eecf797736d478d3a9 100644 --- a/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php +++ b/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php @@ -25,7 +25,7 @@ class ShapeOnlyColorEditableWidget extends WidgetBase { public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) { $element['shape'] = [ '#type' => 'hidden', - '#value' => $items[$delta]->shape + '#value' => $items[$delta]->shape, ]; $element['color'] = [ diff --git a/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php b/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php index dd526b863a9ae883197bb3b84a994200d087497b..2ba4869d8ad6a4bfd8241b2176092030e5b900f9 100644 --- a/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php +++ b/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php @@ -88,7 +88,7 @@ public function triggerRendererException() { '#post_render' => [ function () { throw new \Exception('This is an exception that occurs during rendering'); - } + }, ], ]; } diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php index ee287f4ced36c51c0494f16d95dc341027a1fef7..121cd31aea3330acdd8f80a59a62a6ff7f24c006 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php @@ -33,7 +33,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#title' => 'Machine name 1', '#description' => 'A machine name.', '#machine_name' => [ - 'source' => ['machine_name_1_label'] + 'source' => ['machine_name_1_label'], ], ]; $form['machine_name_2_label'] = [ @@ -45,7 +45,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#title' => 'Machine name 2', '#description' => 'Another machine name.', '#machine_name' => [ - 'source' => ['machine_name_2_label'] + 'source' => ['machine_name_2_label'], ], ]; $form['submit'] = [ diff --git a/core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php b/core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php index 1bc25bb557abee52d2ca966cde600680f946cd97..3197aa5bef602466437666935cb4b286a27e2516 100644 --- a/core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php +++ b/core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php @@ -135,7 +135,7 @@ public static function addLink(array $form, FormStateInterface $form_state) { $form['added_link'] = [ '#title' => 'Added link', '#type' => 'link', - '#url' => Url::fromRoute('js_webassert_test.js_webassert_test_form') + '#url' => Url::fromRoute('js_webassert_test.js_webassert_test_form'), ]; return $form; } diff --git a/core/modules/system/tests/modules/menu_test/src/TestControllers.php b/core/modules/system/tests/modules/menu_test/src/TestControllers.php index ca0f8d685440eac1e40178bbb09f4f1cc2074fb9..dafaab0e511cceb11cac02c34da85d37cea5a134 100644 --- a/core/modules/system/tests/modules/menu_test/src/TestControllers.php +++ b/core/modules/system/tests/modules/menu_test/src/TestControllers.php @@ -77,9 +77,9 @@ public function testContextual() { '#contextual_links' => [ 'menu_test_menu' => [ 'route_parameters' => ['bar' => 1], - ] - ] - ] + ], + ], + ], ]; } diff --git a/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php b/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php index 3253b0c9bd0fe0ee67f54b45c6d09f61280446ac..4f1fdad6431c03c435793b7ac20acbd4f037cc27 100644 --- a/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php +++ b/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php @@ -69,7 +69,7 @@ public function queryParameters() { ], '#pre_render' => [ 'Drupal\pager_test\Controller\PagerTestController::showPagerCacheContext', - ] + ], ]; return $build; diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php index d5f6d6c2937e596651466ae30b49142f7a5cc542..b8aedac36a50e22b38e31fad479936035e52c9c9 100644 --- a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php +++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php @@ -45,7 +45,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { // Instead of the derivative label, the specific label will be used. 'label' => t('Derivative label'), // This setting will be merged in. - 'setting' => 'default' + 'setting' => 'default', ] + $base_plugin_definition, ]; diff --git a/core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php b/core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php index c15b16d8b0b4a00a64b00b588157322becc2ca27..c51d3c89835bcbd53c514d0ad7fd8ed8b3e3d5df 100644 --- a/core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php +++ b/core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php @@ -20,8 +20,8 @@ public function testFilterRender() { '#safe_join_items' => [ 'will be escaped', $this->t('will be markup'), - ['#markup' => 'will be rendered'] - ] + ['#markup' => 'will be rendered'], + ], ]; } diff --git a/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php b/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php index 8e1f69e792282fbfa0d421a66811d12e75422de4..1e995c58f754c5441b8abaeafd350c97327a3c1f 100644 --- a/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php +++ b/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php @@ -100,7 +100,7 @@ public function registryLoaderRender() { public function renderable() { return [ '#theme' => 'twig_theme_test_renderable', - '#renderable' => new ExampleRenderable() + '#renderable' => new ExampleRenderable(), ]; } diff --git a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php index d2114fdf8ec26c1873d2cd0a01c76e15c9fe9882..488fa6ef42ebcbbf538f1285c3840e07223ab064 100644 --- a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php +++ b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php @@ -33,7 +33,7 @@ public function testSystemTimezone() { $options = [ 'query' => [ 'date' => 'Tue+Sep+17+2013+21%3A35%3A31+GMT%2B0100+(BST)#', - ] + ], ]; // Query the AJAX Timezone Callback with a long-format date. $response = $this->drupalGet('system/timezone/BST/3600/1', $options); diff --git a/core/modules/system/tests/src/Functional/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php b/core/modules/system/tests/src/Functional/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php index b4888db0985ade5c44f3c6353c3a5da4a0ebd65f..2c501acb012bffec498e6eb75d78c0ad35acba0f 100644 --- a/core/modules/system/tests/src/Functional/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php +++ b/core/modules/system/tests/src/Functional/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php @@ -141,7 +141,7 @@ public function testAddingRequiredRevisionMetadataKeys() { $revision_metadata_keys = [ 'revision_user' => 'revision_user', 'revision_created' => 'revision_created', - 'revision_log_message' => 'revision_log_message' + 'revision_log_message' => 'revision_log_message', ]; $this->assertEquals($revision_metadata_keys, $entity_type->getRevisionMetadataKeys(TRUE)); @@ -167,7 +167,7 @@ public function testAddingRequiredRevisionMetadataKeys() { $definition = [ 'id' => 'entity_test_mul_revlog', 'revision_metadata_keys' => [ - 'revision_default' => 'revision_default' + 'revision_default' => 'revision_default', ], ]; $entity_type = new ContentEntityType($definition); diff --git a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php index 04b1f663614cc79bfa83748ad43dc25955b02117..a4fbb667badc5e9c9c2f56e4876423a850841a41 100644 --- a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php +++ b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php @@ -28,11 +28,11 @@ public function _getFakeModuleFiles() { 'fake.module', 'fake.info.yml', 'theme' => [ - 'fake.html.twig' + 'fake.html.twig', ], 'inc' => [ - 'fake.inc' - ] + 'fake.inc', + ], ]; return $files; } diff --git a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php index 1bfa19f482f4646cb4ed29994d019d78fd6c963a..2262670f2bd0be83d468a37bbb44d615411ff006 100644 --- a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php +++ b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php @@ -45,7 +45,7 @@ public function testLanguageSelectElementOptions() { 'edit-languages-all' => LanguageInterface::STATE_ALL, 'edit-languages-configurable' => LanguageInterface::STATE_CONFIGURABLE, 'edit-languages-locked' => LanguageInterface::STATE_LOCKED, - 'edit-languages-config-and-locked' => LanguageInterface::STATE_CONFIGURABLE | LanguageInterface::STATE_LOCKED + 'edit-languages-config-and-locked' => LanguageInterface::STATE_CONFIGURABLE | LanguageInterface::STATE_LOCKED, ]; foreach ($ids as $id => $flags) { $this->assertField($id, format_string('The @id field was found on the page.', ['@id' => $id])); diff --git a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php index 6f5dc7da684a3db9684ea0f9401c78343db53222..586b1c93b2bfa885612693a74f7f9f3a3698f708 100644 --- a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php +++ b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php @@ -67,9 +67,9 @@ public function testHtml5ShivIsNotLoaded() { "query" => [ 'ajax_page_state' => [ - 'libraries' => 'core/html5shiv' - ] - ] + 'libraries' => 'core/html5shiv', + ], + ], ] ); $this->assertNoRaw( diff --git a/core/modules/system/tests/src/Functional/Update/RecalculatedDependencyTest.php b/core/modules/system/tests/src/Functional/Update/RecalculatedDependencyTest.php index 6eb51a2a5123a6e2911e25b73c3d09a8a2ff3890..fd9caf52a5c268c719132f270ed9feed4c472406 100644 --- a/core/modules/system/tests/src/Functional/Update/RecalculatedDependencyTest.php +++ b/core/modules/system/tests/src/Functional/Update/RecalculatedDependencyTest.php @@ -58,7 +58,7 @@ public function testUpdate() { $this->assertEqual([ 'field.storage.node.field_tags', 'node.type.article', - 'taxonomy.vocabulary.tags' + 'taxonomy.vocabulary.tags', ], $data['dependencies']['config']); $data = \Drupal::config('field.field.user.user.user_picture')->get(); diff --git a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php index 663bff6bae769823c8f780645a3cc2a277edeac8..7a6d6685e9ed8c0a98209068f4c17bb5189cc4b1 100644 --- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php +++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php @@ -162,13 +162,13 @@ public function testSystemMenuBlockConfigDependencies() { $dependencies = $block->calculateDependencies()->getDependencies(); $expected = [ 'config' => [ - 'system.menu.' . $this->menu->id() + 'system.menu.' . $this->menu->id(), ], 'module' => [ - 'system' + 'system', ], 'theme' => [ - 'stark' + 'stark', ], ]; $this->assertIdentical($expected, $dependencies); @@ -247,7 +247,7 @@ public function testConfigLevelDepth() { 'test.example2' => [ 'test.example3' => [ 'test.example4' => [], - ] + ], ], 'test.example5' => [ 'test.example7' => [], diff --git a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php index 03d22afe57893fa7db00f3c32e483fca11960c39..28d056cecd991f1a8b466c9a59d152fdcc3637db 100644 --- a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php +++ b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php @@ -95,7 +95,7 @@ protected function doSubmitForm($values, $valid_input) { public function testProgrammaticAccessBypass() { $form_state = (new FormState())->setValues([ 'textfield' => 'dummy value', - 'field_restricted' => 'dummy value' + 'field_restricted' => 'dummy value', ]); // Programmatically submit the form with a value for the restricted field. diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php index cb7f5eb7c4e1320523def9e5d867160d3af8c6b7..f111d7b36f8588905e2170d562274ab5e4eef05b 100644 --- a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php +++ b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php @@ -35,7 +35,7 @@ public function testSpecifyDatabaseKey() { Database::addConnectionInfo('magic_db', 'default', Database::getConnectionInfo('default')['default']); $command_tester->execute([ - '--database' => 'magic_db' + '--database' => 'magic_db', ]); $this->assertEquals('magic_db', $command->getDatabaseConnection($command_tester->getInput())->getKey(), 'Special db key is returned'); @@ -48,7 +48,7 @@ public function testSpecifyDatabaseDoesNotExist() { $command = new DbCommandBaseTester(); $command_tester = new CommandTester($command); $command_tester->execute([ - '--database' => 'dne' + '--database' => 'dne', ]); $this->setExpectedException(ConnectionNotDefinedException::class); $command->getDatabaseConnection($command_tester->getInput()); @@ -63,13 +63,13 @@ public function testSpecifyDbUrl() { $command = new DbCommandBaseTester(); $command_tester = new CommandTester($command); $command_tester->execute([ - '-db-url' => $connection_info['driver'] . '://' . $connection_info['username'] . ':' . $connection_info['password'] . '@' . $connection_info['host'] . '/' . $connection_info['database'] + '-db-url' => $connection_info['driver'] . '://' . $connection_info['username'] . ':' . $connection_info['password'] . '@' . $connection_info['host'] . '/' . $connection_info['database'], ]); $this->assertEquals('db-tools', $command->getDatabaseConnection($command_tester->getInput())->getKey()); Database::removeConnection('db-tools'); $command_tester->execute([ - '--database-url' => $connection_info['driver'] . '://' . $connection_info['username'] . ':' . $connection_info['password'] . '@' . $connection_info['host'] . '/' . $connection_info['database'] + '--database-url' => $connection_info['driver'] . '://' . $connection_info['username'] . ':' . $connection_info['password'] . '@' . $connection_info['host'] . '/' . $connection_info['database'], ]); $this->assertEquals('db-tools', $command->getDatabaseConnection($command_tester->getInput())->getKey()); } diff --git a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php index a3c5730b325176a47b19d55092d5a6ebff8b32bf..a4e5bcc3e7ef78a8272039ca9af97a8ca275ff26 100644 --- a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php +++ b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php @@ -134,7 +134,7 @@ public function providerTestBuildCacheability() { '#theme' => 'menu__mock', '#items' => [ // To be filled when generating test cases, using $get_built_element(). - ] + ], ]; $get_built_element = function (MenuLinkTreeElement $element) { @@ -248,10 +248,10 @@ public function providerTestBuildCacheability() { new MenuLinkTreeElement($multi_level_root_a, TRUE, 0, FALSE, [ new MenuLinkTreeElement($multi_level_parent_c, TRUE, 0, FALSE, [ new MenuLinkTreeElement($links[0], FALSE, 0, FALSE, []), - ]) + ]), ]), new MenuLinkTreeElement($multi_level_root_b, TRUE, 0, FALSE, [ - new MenuLinkTreeElement($links[1], FALSE, 1, FALSE, []) + new MenuLinkTreeElement($links[1], FALSE, 1, FALSE, []), ]), ]; $tree[0]->subtree[0]->subtree[0]->access = $access; diff --git a/core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php b/core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php index 9d97a55f11f02022eec4a799d5bee7164727a491..a312111eabef0fdf2b57de9de28bd31ed8a92cb0 100644 --- a/core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php +++ b/core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php @@ -28,7 +28,7 @@ public function defaultConfiguration() { 'sort' => [ 'field' => 'name', 'direction' => 'asc', - ] + ], ] + parent::defaultConfiguration(); } diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php b/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php index 185990185d69f60b355dcf216373f8aa7eedd398..82048a3c2f86f4a1525040975cd24b43d05527eb 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php @@ -43,7 +43,7 @@ public function fields() { 'hierarchy' => $this->t('The type of hierarchy allowed within the vocabulary. (0 = disabled, 1 = single, 2 = multiple)'), 'module' => $this->t('Module responsible for the vocabulary.'), 'weight' => $this->t('The weight of the vocabulary in relation to other vocabularies.'), - 'machine_name' => $this->t('Unique machine name of the vocabulary.') + 'machine_name' => $this->t('Unique machine name of the vocabulary.'), ]; } diff --git a/core/modules/taxonomy/src/TermViewsData.php b/core/modules/taxonomy/src/TermViewsData.php index 6d47f3ffb6b68fcafa3a64a86c272fc4d31cb1b8..469c3e83583fccad9b3ec1bed2ae4fdba8536e60 100644 --- a/core/modules/taxonomy/src/TermViewsData.php +++ b/core/modules/taxonomy/src/TermViewsData.php @@ -61,7 +61,7 @@ public function getViewsData() { 'argument field' => 'tid', 'base' => 'node_field_data', 'field' => 'nid', - 'relationship' => 'node_field_data:term_node_tid' + 'relationship' => 'node_field_data:term_node_tid', ], ]; @@ -216,7 +216,7 @@ public function getViewsData() { 'title' => $this->t('Post date'), 'help' => $this->t('The date the content related to a term was posted.'), 'sort' => [ - 'id' => 'date' + 'id' => 'date', ], 'filter' => [ 'id' => 'date', diff --git a/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php b/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php index 00f0ee784b6914dfae9ef59ab724401f220fcf4a..ce28b1285d76055eabb959f07ae8596ef3d899cb 100644 --- a/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php +++ b/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php @@ -188,7 +188,7 @@ public function testAutocompleteOrderedResults() { foreach ($expectedResults as $termName) { $expected[] = [ 'value' => $termName . ' (' . $this->termIds[$termName] . ')', - 'label' => $termName + 'label' => $termName, ]; } diff --git a/core/modules/taxonomy/src/VocabularyListBuilder.php b/core/modules/taxonomy/src/VocabularyListBuilder.php index 7ae420f12d7e6064f09972ca4edf02cb70fbbeb3..b6f6921db43633e2324d9ce8ebecd0b25e07d282 100644 --- a/core/modules/taxonomy/src/VocabularyListBuilder.php +++ b/core/modules/taxonomy/src/VocabularyListBuilder.php @@ -177,7 +177,7 @@ public function render() { $this->renderer->addCacheableDependency($build['table'], $create_access); if ($create_access->isAllowed()) { $build['table']['#empty'] = t('No vocabularies available. Add vocabulary.', [ - ':link' => Url::fromRoute('entity.taxonomy_vocabulary.add_form')->toString() + ':link' => Url::fromRoute('entity.taxonomy_vocabulary.add_form')->toString(), ]); } else { diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php index 4de73705d991e2bb13133f7c3d0b94e04c8d818d..992e5bee18ccd3aefaf90241851f81789b8c68a4 100644 --- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php @@ -199,7 +199,7 @@ public function testExposedFilter() { // Select 'Term' and 'Vocabulary' as filters. $edit = [ 'name[taxonomy_term_field_data.tid]' => TRUE, - 'name[taxonomy_term_field_data.vid]' => TRUE + 'name[taxonomy_term_field_data.vid]' => TRUE, ]; $this->drupalPostForm('admin/structure/views/nojs/add-handler/test_taxonomy_term_name/default/filter', $edit, 'Add and configure filter criteria'); // Select 'Empty Vocabulary' and 'Autocomplete' from the list of options. diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php index f7c2f7c1e23a33d24d688e5e1bd3843113d91720..7803f3966e7bb73414c42303ab183578d8175627 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php @@ -148,7 +148,7 @@ public function testUninstallReinstall() { 'field_name' => $field_name, 'entity_type' => 'taxonomy_term', 'type' => 'text', - 'cardinality' => 4 + 'cardinality' => 4, ]; FieldStorageConfig::create($storage_definition)->save(); $field_definition = [ diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php index 474969dde1f38e6b05069aab7344e502b4ca4ea8..4a8b1538f3a2cc68de77bfc80dd962fb58a1d51d 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php @@ -47,7 +47,7 @@ protected function setUp() { 'd7_field', 'd7_taxonomy_vocabulary', 'd7_field_instance', - 'd7_taxonomy_term' + 'd7_taxonomy_term', ]); } diff --git a/core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php b/core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php index f2aa1ccddea014424ad1abaa53f422d68c3258c5..17fc9d5e42aca37a9571e8b6ffc33ac3517eadbd 100644 --- a/core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php +++ b/core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php @@ -67,7 +67,7 @@ public function getConstraints() { 'Length' => [ 'max' => $max_length, 'maxMessage' => t('%name: the telephone number may not be longer than @max characters.', ['%name' => $this->getFieldDefinition()->getLabel(), '@max' => $max_length]), - ] + ], ], ]); diff --git a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php index 18bedf0725ebeef363a0e4d65b3de06a3875bd9f..75e626f66dd5c3b6f592b4705fc70cc7bea9f7c1 100644 --- a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php +++ b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php @@ -21,7 +21,7 @@ class TelephoneFieldTest extends BrowserTestBase { public static $modules = [ 'field', 'node', - 'telephone' + 'telephone', ]; /** diff --git a/core/modules/text/src/Plugin/Field/FieldType/TextItem.php b/core/modules/text/src/Plugin/Field/FieldType/TextItem.php index 447a0b180d5b2592d4f6b5ff722c5127bfc77259..dcee58346d1a18f8397ddbf7e05155bc58bf119d 100644 --- a/core/modules/text/src/Plugin/Field/FieldType/TextItem.php +++ b/core/modules/text/src/Plugin/Field/FieldType/TextItem.php @@ -62,7 +62,7 @@ public function getConstraints() { 'Length' => [ 'max' => $max_length, 'maxMessage' => t('%name: the text may not be longer than @max characters.', ['%name' => $this->getFieldDefinition()->getLabel(), '@max' => $max_length]), - ] + ], ], ]); } diff --git a/core/modules/text/src/Tests/TextFieldTest.php b/core/modules/text/src/Tests/TextFieldTest.php index 52286a63ac95a9c61c8a82b9411ef334832a595d..ecdb0af06d4dc38889038188f79cbc13902da825 100644 --- a/core/modules/text/src/Tests/TextFieldTest.php +++ b/core/modules/text/src/Tests/TextFieldTest.php @@ -43,7 +43,7 @@ public function testTextFieldValidation() { 'type' => 'text', 'settings' => [ 'max_length' => $max_length, - ] + ], ]); $field_storage->save(); FieldConfig::create([ @@ -89,7 +89,7 @@ public function testRequiredLongTextWithFileUpload() { $field_storage = FieldStorageConfig::create([ 'field_name' => $file_field_name, 'entity_type' => 'entity_test', - 'type' => 'file' + 'type' => 'file', ]); $field_storage->save(); FieldConfig::create([ @@ -116,7 +116,7 @@ public function testRequiredLongTextWithFileUpload() { $this->drupalPostForm('entity_test/add', $edit, 'Upload'); $this->assertResponse(200); $edit = [ - 'text_long[0][value]' => 'Long text' + 'text_long[0][value]' => 'Long text', ]; $this->drupalPostForm(NULL, $edit, 'Save'); $this->assertResponse(200); @@ -152,7 +152,7 @@ public function _testTextfieldWidgetsFormatted($field_type, $widget_type) { $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', - 'type' => $field_type + 'type' => $field_type, ]); $field_storage->save(); FieldConfig::create([ diff --git a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php index 1f4a5bfdfed95adb6bdc1f3f3b5bafe19645e630..c110ba104981425b1d6e0ef4bee1d724839b92a2 100644 --- a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php +++ b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php @@ -105,7 +105,7 @@ protected function createField($entity_type) { 'type' => 'text_with_summary', 'settings' => [ 'max_length' => 10, - ] + ], ]); $this->fieldStorage->save(); $this->field = FieldConfig::create([ diff --git a/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php index 2273c186bfb9b27dbaf427de5963de1381c1d8be..51ec9af9c830a88b9d3b75baf81127066079fc37 100644 --- a/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php +++ b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php @@ -76,7 +76,7 @@ public function testProcessBooleanTextImplicitValues() { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo\nbar", - ] + ], ]; $this->plugin->processCckFieldValues($this->migration, 'field', $info); @@ -101,7 +101,7 @@ public function testProcessBooleanTextExplicitValues() { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo|Foo\nbaz|Baz", - ] + ], ]; $this->plugin->processCckFieldValues($this->migration, 'field', $info); diff --git a/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php index 8bf5d2a2d07d5d1352d55f6f40335c90ab0f553a..e17404e0488dbf4f9985b0fa5a78fc73fd5c5f6c 100644 --- a/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php @@ -76,7 +76,7 @@ public function testProcessBooleanTextImplicitValues() { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo\nbar", - ] + ], ]; $this->plugin->processFieldValues($this->migration, 'field', $info); @@ -101,7 +101,7 @@ public function testProcessBooleanTextExplicitValues() { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo|Foo\nbaz|Baz", - ] + ], ]; $this->plugin->processFieldValues($this->migration, 'field', $info); diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php index acd77909e44cc7bc8c75cff68cd09063e579634c..696c34cba325e0e0a4024a7cec197952a2ace49e 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php @@ -76,7 +76,7 @@ public function testProcessBooleanTextImplicitValues() { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo\nbar", - ] + ], ]; $this->plugin->processCckFieldValues($this->migration, 'field', $info); @@ -101,7 +101,7 @@ public function testProcessBooleanTextExplicitValues() { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo|Foo\nbaz|Baz", - ] + ], ]; $this->plugin->processCckFieldValues($this->migration, 'field', $info); diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php index b79a0b5c3ed68ac025702dd8266030313f888cf4..4cc1badc645949e0677cde04e0afe23ed5856e6c 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php @@ -75,7 +75,7 @@ public function testProcessBooleanTextImplicitValues() { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo\nbar", - ] + ], ]; $this->plugin->processFieldValues($this->migration, 'field', $info); @@ -100,7 +100,7 @@ public function testProcessBooleanTextExplicitValues() { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo|Foo\nbaz|Baz", - ] + ], ]; $this->plugin->processFieldValues($this->migration, 'field', $info); diff --git a/core/modules/tour/src/Tests/TourTest.php b/core/modules/tour/src/Tests/TourTest.php index 738bae8e2ae9327b3cccadbf6e13f0dce5d9f63d..05d3ae61688897baf079339c0931db8f2528b092 100644 --- a/core/modules/tour/src/Tests/TourTest.php +++ b/core/modules/tour/src/Tests/TourTest.php @@ -66,7 +66,7 @@ protected function setUp() { $this->drupalPlaceBlock('local_actions_block', [ 'theme' => 'seven', - 'region' => 'content' + 'region' => 'content', ]); } diff --git a/core/modules/tour/tests/src/Functional/TourTest.php b/core/modules/tour/tests/src/Functional/TourTest.php index 55f3743f61365a2393b26625cac8883eedb13a83..1db1bb8cae5044f05ebde3c8d4672af0b73d5bf4 100644 --- a/core/modules/tour/tests/src/Functional/TourTest.php +++ b/core/modules/tour/tests/src/Functional/TourTest.php @@ -45,7 +45,7 @@ protected function setUp() { $this->drupalPlaceBlock('local_actions_block', [ 'theme' => 'seven', - 'region' => 'content' + 'region' => 'content', ]); } @@ -130,7 +130,7 @@ public function testTourFunctionality() { 'url' => 'http://local/image.png', 'weight' => 1, 'attributes' => [ - 'data-id' => 'tour-code-test-2' + 'data-id' => 'tour-code-test-2', ], ], ], diff --git a/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php b/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php index 7bd675b2ed1d301e3afb828410d253703d9e9bcc..9f2b0a758b0169797e5520c5d05cbdf0a216cf34 100644 --- a/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php +++ b/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php @@ -31,7 +31,7 @@ public function testUserUid() { [ 'nid' => $this->node->id(), 'title' => $this->node->label(), - ] + ], ]; $view = Views::getView('test_tracker_user_uid'); diff --git a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php index 0318b8e7bd7abfeae9ba9a6cfb42d71f52e2730a..28d377261498fcf1bfb582dc9d4d370d27a43730 100644 --- a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php +++ b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php @@ -30,7 +30,7 @@ public function providerSource() { 'nid' => '2', 'published' => '1', 'changed' => '1421727536', - ] + ], ]; // The expected results are identical to the source data. diff --git a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php index ffcee93b56cb5e1dab75ae2242cda1b0fa477bc6..293e559a20580cb5653dd16ca5c5788dd8ebb3dc 100644 --- a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php +++ b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php @@ -31,7 +31,7 @@ public function providerSource() { 'uid' => '2', 'published' => '1', 'changed' => '1421727536', - ] + ], ]; // The expected results are identical to the source data. diff --git a/core/modules/tracker/tracker.views.inc b/core/modules/tracker/tracker.views.inc index 54402879dd5eedabfe9b91900e14ac692e0f323e..be15d5747853503782bf8aa92aeb56a1d442c928 100644 --- a/core/modules/tracker/tracker.views.inc +++ b/core/modules/tracker/tracker.views.inc @@ -173,7 +173,7 @@ function tracker_views_data_alter(&$data) { 'field' => 'uid', 'name table' => 'users_field_data', 'name field' => 'name', - 'id' => 'tracker_user_uid' + 'id' => 'tracker_user_uid', ], ]; } diff --git a/core/modules/update/src/Controller/UpdateController.php b/core/modules/update/src/Controller/UpdateController.php index 30b25c20642f58bca4438aa43fb3381182a543f7..6a8ec6abcbe8e8d295078ef34f42ae967e358e49 100644 --- a/core/modules/update/src/Controller/UpdateController.php +++ b/core/modules/update/src/Controller/UpdateController.php @@ -45,7 +45,7 @@ public static function create(ContainerInterface $container) { */ public function updateStatus() { $build = [ - '#theme' => 'update_report' + '#theme' => 'update_report', ]; if ($available = update_get_available(TRUE)) { $this->moduleHandler()->loadInclude('update', 'compare.inc'); diff --git a/core/modules/update/src/UpdateSettingsForm.php b/core/modules/update/src/UpdateSettingsForm.php index ac8981cf49eb035aab1ea666100b7a9afae3a877..2a4e30d4896303559c2d85802a2a31ab8c2abebd 100644 --- a/core/modules/update/src/UpdateSettingsForm.php +++ b/core/modules/update/src/UpdateSettingsForm.php @@ -95,7 +95,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 'all' => t('All newer versions'), 'security' => t('Only security updates'), ], - '#description' => t('You can choose to send email only if a security update is available, or to be notified about all newer versions. If there are updates available of Drupal core or any of your installed modules and themes, your site will always print a message on the status report page, and will also display an error message on administration pages if there is a security update.', [':status_report' => $this->url('system.status')]) + '#description' => t('You can choose to send email only if a security update is available, or to be notified about all newer versions. If there are updates available of Drupal core or any of your installed modules and themes, your site will always print a message on the status report page, and will also display an error message on administration pages if there is a security update.', [':status_report' => $this->url('system.status')]), ]; return parent::buildForm($form, $form_state); diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc index 1c2cc60fb2e76c0dbbf54bc074bceef396c3421f..664f25f9c501bb4867e84156fc36c946ecb78a50 100644 --- a/core/modules/update/update.authorize.inc +++ b/core/modules/update/update.authorize.inc @@ -261,7 +261,7 @@ function update_authorize_update_batch_finished($success, $results) { 'absolute' => TRUE, 'base_url' => $GLOBALS['base_url'], ], - '#access' => $url->access(\Drupal::currentUser()) + '#access' => $url->access(\Drupal::currentUser()), ]; // Unset the variable since it is no longer needed. diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index 91864632dcf864f282ee10a79aa0bc5c69dda37f..e42093cf7a2a09802ccbdc50c2645e97038bdf5d 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -30,7 +30,7 @@ function template_preprocess_update_report(&$variables) { 'library' => [ 'update/drupal.update.admin', ], - ] + ], ]; // For no project update data, populate no data message. @@ -230,7 +230,7 @@ function template_preprocess_update_project_status(&$variables) { $extra_item['data'] = [ '#prefix' => '', '#markup' => $value['data'], - '#suffix' => '' + '#suffix' => '
                ', ]; $variables['extras'][] = $extra_item; } diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index 9301f80e355d299b0302b8df0cd78a4616de14c0..3624a9c934c8fa53e5493879088cd5f86b503072 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -347,7 +347,7 @@ protected function getEditedFieldNames(FormStateInterface $form_state) { 'timezone', 'langcode', 'preferred_langcode', - 'preferred_admin_langcode' + 'preferred_admin_langcode', ], parent::getEditedFieldNames($form_state)); } @@ -365,7 +365,7 @@ protected function flagViolations(EntityConstraintViolationListInterface $violat 'timezone', 'langcode', 'preferred_langcode', - 'preferred_admin_langcode' + 'preferred_admin_langcode', ]; foreach ($violations->getByFields($field_names) as $violation) { list($field_name) = explode('.', $violation->getPropertyPath(), 2); diff --git a/core/modules/user/src/AccountSettingsForm.php b/core/modules/user/src/AccountSettingsForm.php index bd80dd7e297bbed86a512ef92ffaafa329a45d78..4a1b5af4a4ac5715b0c16bb2876aa5554510c041 100644 --- a/core/modules/user/src/AccountSettingsForm.php +++ b/core/modules/user/src/AccountSettingsForm.php @@ -154,13 +154,13 @@ public function buildForm(array $form, FormStateInterface $form_state) { USER_REGISTER_ADMINISTRATORS_ONLY => $this->t('Administrators only'), USER_REGISTER_VISITORS => $this->t('Visitors'), USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL => $this->t('Visitors, but administrator approval is required'), - ] + ], ]; $form['registration_cancellation']['user_email_verification'] = [ '#type' => 'checkbox', '#title' => $this->t('Require email verification when a visitor creates an account'), '#default_value' => $config->get('verify_mail'), - '#description' => $this->t('New users will be required to validate their email address prior to logging into the site, and will be assigned a system-generated password. With this setting disabled, users will be logged in immediately upon registering, and may select their own passwords during registration.') + '#description' => $this->t('New users will be required to validate their email address prior to logging into the site, and will be assigned a system-generated password. With this setting disabled, users will be logged in immediately upon registering, and may select their own passwords during registration.'), ]; $form['registration_cancellation']['user_password_strength'] = [ '#type' => 'checkbox', diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php index 7f4f4cdc78eb05d8b9d0c15ff1bcc47c371946ad..b8675866f6f47163ce6b0a64e85a78b8f5ddd6b0 100644 --- a/core/modules/user/src/Entity/User.php +++ b/core/modules/user/src/Entity/User.php @@ -428,7 +428,7 @@ public static function getAnonymousUser() { 'name' => [LanguageInterface::LANGCODE_DEFAULT => ''], // Explicitly set the langcode to ensure that field definitions do not // need to be fetched to figure out a default. - 'langcode' => [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED] + 'langcode' => [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED], ], $entity_type->id()); } return clone static::$anonymousUser; diff --git a/core/modules/user/src/Plugin/views/wizard/Users.php b/core/modules/user/src/Plugin/views/wizard/Users.php index 00b6863acae722a202082135a42c502d3d0c7164..6ba045f70d990a5e439405ad906062d3d864bd1f 100644 --- a/core/modules/user/src/Plugin/views/wizard/Users.php +++ b/core/modules/user/src/Plugin/views/wizard/Users.php @@ -37,7 +37,7 @@ class Users extends WizardPluginBase { 'plugin_id' => 'boolean', 'entity_type' => 'user', 'entity_field' => 'status', - ] + ], ]; /** diff --git a/core/modules/user/src/UserViewsData.php b/core/modules/user/src/UserViewsData.php index 854f6791e4a8c7874b519f449218ca6387ce4322..955ab5967bc153cde414b93f9c0f05a912f1605f 100644 --- a/core/modules/user/src/UserViewsData.php +++ b/core/modules/user/src/UserViewsData.php @@ -60,7 +60,7 @@ public function getViewsData() { 'argument field' => 'uid', 'base' => 'node_field_data', 'field' => 'nid', - 'relationship' => 'node_field_data:uid' + 'relationship' => 'node_field_data:uid', ], ]; diff --git a/core/modules/user/tests/fixtures/update/drupal-8.user-email-token-2587275.php b/core/modules/user/tests/fixtures/update/drupal-8.user-email-token-2587275.php index eaa2a9a618cbd91de4fc8c7676ed38cf0b86ae21..8f19b6e17c93f148ded49adaa3207d97413cc28c 100644 --- a/core/modules/user/tests/fixtures/update/drupal-8.user-email-token-2587275.php +++ b/core/modules/user/tests/fixtures/update/drupal-8.user-email-token-2587275.php @@ -18,5 +18,5 @@ ->values([ 'collection' => '', 'name' => 'user.mail', - 'data' => "a:10:{s:14:\"cancel_confirm\";a:2:{s:4:\"body\";s:369:\"[user:name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n-- [site:name] team\";s:7:\"subject\";s:59:\"Account cancellation request for [user:name] at [site:name]\";}s:14:\"password_reset\";a:2:{s:4:\"body\";s:397:\"[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n-- [site:name] team\";s:7:\"subject\";s:60:\"Replacement login information for [user:name] at [site:name]\";}s:22:\"register_admin_created\";a:2:{s:4:\"body\";s:463:\"[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:58:\"An administrator created an account for you at [site:name]\";}s:29:\"register_no_approval_required\";a:2:{s:4:\"body\";s:437:\"[user:name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:46:\"Account details for [user:name] at [site:name]\";}s:25:\"register_pending_approval\";a:2:{s:4:\"body\";s:281:\"[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n-- [site:name] team\";s:7:\"subject\";s:71:\"Account details for [user:name] at [site:name] (pending admin approval)\";}s:31:\"register_pending_approval_admin\";a:2:{s:4:\"body\";s:56:\"[user:name] has applied for an account.\n\n[user:edit-url]\";s:7:\"subject\";s:71:\"Account details for [user:name] at [site:name] (pending admin approval)\";}s:16:\"status_activated\";a:2:{s:4:\"body\";s:446:\"[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:57:\"Account details for [user:name] at [site:name] (approved)\";}s:14:\"status_blocked\";a:2:{s:4:\"body\";s:89:\"[user:name],\n\nYour account on [site:account-name] has been blocked.\n\n-- [site:name] team\";s:7:\"subject\";s:56:\"Account details for [user:name] at [site:name] (blocked)\";}s:15:\"status_canceled\";a:2:{s:4:\"body\";s:82:\"[user:name],\n\nYour account on [site:name] has been canceled.\n\n-- [site:name] team\";s:7:\"subject\";s:57:\"Account details for [user:name] at [site:name] (canceled)\";}s:8:\"langcode\";s:2:\"en\";}" + 'data' => "a:10:{s:14:\"cancel_confirm\";a:2:{s:4:\"body\";s:369:\"[user:name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n-- [site:name] team\";s:7:\"subject\";s:59:\"Account cancellation request for [user:name] at [site:name]\";}s:14:\"password_reset\";a:2:{s:4:\"body\";s:397:\"[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n-- [site:name] team\";s:7:\"subject\";s:60:\"Replacement login information for [user:name] at [site:name]\";}s:22:\"register_admin_created\";a:2:{s:4:\"body\";s:463:\"[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:58:\"An administrator created an account for you at [site:name]\";}s:29:\"register_no_approval_required\";a:2:{s:4:\"body\";s:437:\"[user:name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:46:\"Account details for [user:name] at [site:name]\";}s:25:\"register_pending_approval\";a:2:{s:4:\"body\";s:281:\"[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n-- [site:name] team\";s:7:\"subject\";s:71:\"Account details for [user:name] at [site:name] (pending admin approval)\";}s:31:\"register_pending_approval_admin\";a:2:{s:4:\"body\";s:56:\"[user:name] has applied for an account.\n\n[user:edit-url]\";s:7:\"subject\";s:71:\"Account details for [user:name] at [site:name] (pending admin approval)\";}s:16:\"status_activated\";a:2:{s:4:\"body\";s:446:\"[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:57:\"Account details for [user:name] at [site:name] (approved)\";}s:14:\"status_blocked\";a:2:{s:4:\"body\";s:89:\"[user:name],\n\nYour account on [site:account-name] has been blocked.\n\n-- [site:name] team\";s:7:\"subject\";s:56:\"Account details for [user:name] at [site:name] (blocked)\";}s:15:\"status_canceled\";a:2:{s:4:\"body\";s:82:\"[user:name],\n\nYour account on [site:name] has been canceled.\n\n-- [site:name] team\";s:7:\"subject\";s:57:\"Account details for [user:name] at [site:name] (canceled)\";}s:8:\"langcode\";s:2:\"en\";}", ])->execute(); diff --git a/core/modules/user/tests/src/Functional/UserAdminTest.php b/core/modules/user/tests/src/Functional/UserAdminTest.php index 4e69346d2e5c1c96a13563f103d609aca88d8667..82e5df807c1e2d48f49950baa195787670f82899 100644 --- a/core/modules/user/tests/src/Functional/UserAdminTest.php +++ b/core/modules/user/tests/src/Functional/UserAdminTest.php @@ -108,7 +108,7 @@ public function testUserAdmin() { $this->drupalPostForm('admin/people', $edit, t('Apply to selected items'), [ // Sort the table by username so that we know reliably which user will be // targeted with the blocking action. - 'query' => ['order' => 'name', 'sort' => 'asc'] + 'query' => ['order' => 'name', 'sort' => 'asc'], ]); $site_name = $this->config('system.site')->get('name'); $this->assertMailString('body', 'Your account on ' . $site_name . ' has been blocked.', 1, 'Blocked message found in the mail sent to user C.'); @@ -129,7 +129,7 @@ public function testUserAdmin() { $this->drupalPostForm('admin/people', $editunblock, t('Apply to selected items'), [ // Sort the table by username so that we know reliably which user will be // targeted with the blocking action. - 'query' => ['order' => 'name', 'sort' => 'asc'] + 'query' => ['order' => 'name', 'sort' => 'asc'], ]); $user_storage->resetCache([$user_c->id()]); $account = $user_storage->load($user_c->id()); diff --git a/core/modules/user/tests/src/Functional/UserMailNotifyTest.php b/core/modules/user/tests/src/Functional/UserMailNotifyTest.php index 57bebc042a48cdf12104a4ba32c238ccedf2bfe3..df22f9cb9399e651ca1e870f74420870013eec62 100644 --- a/core/modules/user/tests/src/Functional/UserMailNotifyTest.php +++ b/core/modules/user/tests/src/Functional/UserMailNotifyTest.php @@ -30,7 +30,7 @@ public function userMailsProvider() { ['status_canceled', ['status_canceled']], ['register_admin_created', ['register_admin_created']], ['register_no_approval_required', ['register_no_approval_required']], - ['register_pending_approval', ['register_pending_approval', 'register_pending_approval_admin']] + ['register_pending_approval', ['register_pending_approval', 'register_pending_approval_admin']], ]; } diff --git a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php index fd6fdd2af1837f9cd20ab50630ef24465b89dc17..a5d271092a0213de42a746b7e0372204e99f6bfd 100644 --- a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php +++ b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php @@ -95,7 +95,7 @@ public function testAdminUserInterface() { $users = [$this->randomMachineName()]; $users = array_map('strtolower', $users); $edit = [ - 'options[value]' => implode(', ', $users) + 'options[value]' => implode(', ', $users), ]; $this->drupalPostForm($path, $edit, t('Apply')); $this->assertRaw(t('There are no entities matching "%value".', ['%value' => implode(', ', $users)])); @@ -105,7 +105,7 @@ public function testAdminUserInterface() { $users = [$random_name, $this->names[0]]; $users = array_map('strtolower', $users); $edit = [ - 'options[value]' => implode(', ', $users) + 'options[value]' => implode(', ', $users), ]; $users = [$users[0]]; $this->drupalPostForm($path, $edit, t('Apply')); @@ -115,7 +115,7 @@ public function testAdminUserInterface() { $users = $this->names; $users = array_map('strtolower', $users); $edit = [ - 'options[value]' => implode(', ', $users) + 'options[value]' => implode(', ', $users), ]; $this->drupalPostForm($path, $edit, t('Apply')); $this->assertNoRaw(t('There are no entities matching "%value".', ['%value' => implode(', ', $users)])); diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php index 5393805ca74496d82a432b127b543a14978bdf67..0ca7f091a2e533152742f267efb6ad73dd811046 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php @@ -60,7 +60,7 @@ protected function assertRoles(MigrateIdMapInterface $id_map) { 'access content', 'migrate test anonymous permission', // From filter_format tables. - 'use text format filtered_html' + 'use text format filtered_html', ]; $this->assertRole('anonymous', $permissions, 1, $id_map); @@ -81,7 +81,7 @@ protected function assertRoles(MigrateIdMapInterface $id_map) { 'migrate test role 1 test permission', // From filter format. 'use text format full_html', - 'use text format php_code' + 'use text format php_code', ]; $this->assertRole('migrate_test_role_1', $permissions, 3, $id_map); @@ -126,7 +126,7 @@ public function testUserRole() { 'administrator1', 'migrate_test_role_11', 'migrate_test_role_21', - 'migrate_test_role_3_that_is_longer_than_thirty_two_characters1' + 'migrate_test_role_3_that_is_longer_than_thirty_two_characters1', ]; $this->assertEmpty(Role::loadMultiple($roles)); diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php index c321185713070c2b740de686c889bc454cb3af3b..99c61fd491081407219da386308649bbd8e67721 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php @@ -99,7 +99,7 @@ public function providerSource() { 'fid' => 4, 'uid' => 1, 'value' => 'yellow', - ] + ], ]; // Expected options are: @@ -114,7 +114,7 @@ public function providerSource() { 'blue' => 'blue', 'green' => 'green', 'yellow' => 'yellow', - ] + ], ]; $tests[0]['expected_data'] = $profile_fields; diff --git a/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php b/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php index 84290cc967d46461200cd2bc7cf7552d0793f9fd..b7c9f68cf1222e23ba993674dec499e347884730 100644 --- a/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php +++ b/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php @@ -79,7 +79,7 @@ public function testAccess($requirements, $access, array $contexts = [], $messag ->will($this->returnValueMap([ ['allowed', TRUE], ['denied', FALSE], - ['other', FALSE] + ['other', FALSE], ] )); $route = new Route('', [], $requirements); diff --git a/core/modules/user/tests/src/Unit/PermissionHandlerTest.php b/core/modules/user/tests/src/Unit/PermissionHandlerTest.php index 2918d2f61eae539d7aafd7f72433b04b9801510f..a621455d44ba6b8bccf7e7b9a33f353f53fdb27c 100644 --- a/core/modules/user/tests/src/Unit/PermissionHandlerTest.php +++ b/core/modules/user/tests/src/Unit/PermissionHandlerTest.php @@ -400,7 +400,7 @@ class TestPermissionCallbacks { public function singleDescription() { return [ - 'access_module_a' => 'single_description' + 'access_module_a' => 'single_description', ]; } diff --git a/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php b/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php index 4e48fba0307955fb95999be43d5bb9b7ba28e06a..efcead4fbaa3164c9a2eb8847dafb4bcdab620eb 100644 --- a/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php +++ b/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php @@ -23,7 +23,7 @@ class RolesRidTest extends UnitTestCase { public function testTitleQuery() { $role1 = new Role([ 'id' => 'test_rid_1', - 'label' => 'test rid 1' + 'label' => 'test rid 1', ], 'user_role'); $role2 = new Role([ 'id' => 'test_rid_2', diff --git a/core/modules/user/user.module b/core/modules/user/user.module index db016a1c3e0c2f309eb7e90a164e1a62293f1831..a2b64648a84239e8d0250047a70bb6fb7122d06e 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -609,7 +609,7 @@ function user_pass_reset_url($account, $options = []) { ], [ 'absolute' => TRUE, - 'language' => \Drupal::languageManager()->getLanguage($langcode) + 'language' => \Drupal::languageManager()->getLanguage($langcode), ] ); } @@ -638,7 +638,7 @@ function user_cancel_url(UserInterface $account, $options = []) { return \Drupal::url('user.cancel_confirm', [ 'user' => $account->id(), 'timestamp' => $timestamp, - 'hashed_pass' => user_pass_rehash($account, $timestamp) + 'hashed_pass' => user_pass_rehash($account, $timestamp), ], $url_options); } diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 47d33a99e3893de6ba74f991b3b68c546c41143d..11a0938449c5b1d871170cb1c5c4d15872a07c03 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -431,7 +431,7 @@ public static function preCreate(EntityStorageInterface $storage, array &$values 'position' => 0, 'display_options' => [], ], - ] + ], ]; } diff --git a/core/modules/views/src/EntityViewsData.php b/core/modules/views/src/EntityViewsData.php index 079ee3bb3d170ae84fccfac603fdbfda5edb94b7..f5672d3dcecec32140cbba86c3ff72faf60b2eaf 100644 --- a/core/modules/views/src/EntityViewsData.php +++ b/core/modules/views/src/EntityViewsData.php @@ -207,7 +207,7 @@ public function getViewsData() { $data[$base_table]['table']['join'][$data_table] = [ 'left_field' => $base_field, 'field' => $base_field, - 'type' => 'INNER' + 'type' => 'INNER', ]; $data[$data_table]['table']['group'] = $this->entityType->getLabel(); $data[$data_table]['table']['provider'] = $this->entityType->getProvider(); diff --git a/core/modules/views/src/Form/ViewsExposedForm.php b/core/modules/views/src/Form/ViewsExposedForm.php index 125cd1fe48d50d8413fecdff8353893cc0cd6e91..173dd776fc2e303f29a62fc88d900b13d1b6b277 100644 --- a/core/modules/views/src/Form/ViewsExposedForm.php +++ b/core/modules/views/src/Form/ViewsExposedForm.php @@ -103,7 +103,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { } $form['actions'] = [ - '#type' => 'actions' + '#type' => 'actions', ]; $form['actions']['submit'] = [ // Prevent from showing up in \Drupal::request()->query. diff --git a/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php b/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php index de9bb26c8dc2a072f00f273512d2e77e8d5f54b5..a2616e8e8f2139d25eae451f74b9cb4fd0586048 100644 --- a/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php +++ b/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php @@ -26,7 +26,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { 'id' => 'standard', 'base_table' => $table, 'title' => $views_info['table']['base']['title'], - 'class' => 'Drupal\views\Plugin\views\wizard\Standard' + 'class' => 'Drupal\views\Plugin\views\wizard\Standard', ]; } } diff --git a/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php b/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php index fc2e9b894b7fca05ca9fc4ce2017d146f62e797d..f700f16aceb57ab91af8e328dc10395fa3541801 100644 --- a/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php +++ b/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php @@ -91,8 +91,8 @@ public function getDerivativeDefinitions($base_plugin_definition) { 'config_dependencies' => [ 'config' => [ $view->getConfigDependencyName(), - ] - ] + ], + ], ]; $this->derivatives[$delta] += $base_plugin_definition; } diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 7c17d2bf9b71fdebda179431e591a664d784a331..d5614c68df8cb04887801f66807e2e80047d1c03 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -400,7 +400,7 @@ protected function viewsTokenReplace($text, $tokens) { '#post_render' => [ function ($children, $elements) { return Xss::filterAdmin($children); - } + }, ], ]; diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index 96a41f3544c09577b5addf60cade9f219b27c88e..b1e2b1db407ab4fa8657d233c2939a22a224abe8 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -549,7 +549,7 @@ public function defaultArgumentForm(&$form, FormStateInterface $form_state) { '#type' => 'checkbox', '#title' => $this->t('Skip default argument for view URL'), '#default_value' => $this->options['default_argument_skip_url'], - '#description' => $this->t('Select whether to include this default argument when constructing the URL for this view. Skipping default arguments is useful e.g. in the case of feeds.') + '#description' => $this->t('Select whether to include this default argument when constructing the URL for this view. Skipping default arguments is useful e.g. in the case of feeds.'), ]; $form['default_argument_type'] = [ @@ -639,7 +639,7 @@ public function defaultSummaryForm(&$form, FormStateInterface $form_state) { '#default_value' => $this->options['summary']['number_of_records'], '#options' => [ 0 => $this->getSortName(), - 1 => $this->t('Number of records') + 1 => $this->t('Number of records'), ], '#states' => [ 'visible' => [ diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 29d188c187d2a72d6036ab12219518b18519c30c..4f1cb2ecd55f9eb956275fe8dfcaebb60f19c96d 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -1032,13 +1032,13 @@ public function optionLink($text, $section, $class = '', $title = '') { 'js' => 'nojs', 'view' => $this->view->storage->id(), 'display_id' => $this->display['id'], - 'type' => $section + 'type' => $section, ], [ 'attributes' => [ 'class' => ['views-ajax-link', $class], 'title' => $title, - 'id' => Html::getUniqueId('views-' . $this->display['id'] . '-' . $section) - ] + 'id' => Html::getUniqueId('views-' . $this->display['id'] . '-' . $section), + ], ])); } @@ -2586,7 +2586,7 @@ public function getArgumentText() { public function getPagerText() { return [ 'items per page title' => $this->t('Items to display'), - 'items per page description' => $this->t('Enter 0 for no limit.') + 'items per page description' => $this->t('Enter 0 for no limit.'), ]; } diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index baf1434449e7c1c98edd11df72616f730d8ed437..23409ec56da04d8a8b72dc6b5732ed943006aa74 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -259,7 +259,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { 'none' => $this->t('No menu entry'), 'normal' => $this->t('Normal menu entry'), 'tab' => $this->t('Menu tab'), - 'default tab' => $this->t('Default menu tab') + 'default tab' => $this->t('Default menu tab'), ], '#default_value' => $menu['type'], ]; @@ -532,7 +532,7 @@ public function getArgumentText() { public function getPagerText() { return [ 'items per page title' => $this->t('Items per page'), - 'items per page description' => $this->t('Enter 0 for no limit.') + 'items per page description' => $this->t('Enter 0 for no limit.'), ]; } diff --git a/core/modules/views/src/Plugin/views/field/EntityField.php b/core/modules/views/src/Plugin/views/field/EntityField.php index ee2882c3b5b0b93095f9fdfedcd08414bca64b0a..faf8da14b11f65e859c64b3ceccb45908f56919e 100644 --- a/core/modules/views/src/Plugin/views/field/EntityField.php +++ b/core/modules/views/src/Plugin/views/field/EntityField.php @@ -408,10 +408,10 @@ protected function defineOptions() { ]; $options['multi_type'] = [ - 'default' => 'separator' + 'default' => 'separator', ]; $options['separator'] = [ - 'default' => ', ' + 'default' => ', ', ]; $options['field_api_classes'] = [ diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index 033bda0784c03fbfe71309738c4478786f09f4b9..d382681be055b02ada3d172526646621036904ac 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -311,7 +311,7 @@ public function getElements() { // @todo Add possible html5 elements. $elements = [ '' => $this->t('- Use default -'), - '0' => $this->t('- None -') + '0' => $this->t('- None -'), ]; $elements += \Drupal::config('views.settings')->get('field_rewrite_elements'); } @@ -1387,7 +1387,7 @@ protected function renderAsLink($alter, $text, $tokens) { ]; $alter += [ - 'path' => NULL + 'path' => NULL, ]; $path = $alter['path']; diff --git a/core/modules/views/src/Plugin/views/field/PrerenderList.php b/core/modules/views/src/Plugin/views/field/PrerenderList.php index f27973ebbfed49dc9f8ab980cbd96b923addb5ec..4ed091f810d51e3f64209291dc2ac426604cd3a7 100644 --- a/core/modules/views/src/Plugin/views/field/PrerenderList.php +++ b/core/modules/views/src/Plugin/views/field/PrerenderList.php @@ -78,8 +78,8 @@ public function renderItems($items) { '#template' => '{{ items|safe_join(separator) }}', '#context' => [ 'items' => $items, - 'separator' => $this->sanitizeValue($this->options['separator'], 'xss_admin') - ] + 'separator' => $this->sanitizeValue($this->options['separator'], 'xss_admin'), + ], ]; } else { diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index b49190b0551102cf1459ac74274d5f2bc91513f4..5b35b6ad3dd234cd0d79d77f71439e774c7f3276 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -1103,7 +1103,7 @@ protected function buildExposedFiltersGroupForm(&$form, FormStateInterface $form '#required' => TRUE, '#attributes' => [ 'class' => ['default-radios'], - ] + ], ]; // From all groups, let chose which is the default. $form['group_info']['default_group_multiple'] = [ @@ -1112,7 +1112,7 @@ protected function buildExposedFiltersGroupForm(&$form, FormStateInterface $form '#default_value' => $this->options['group_info']['default_group_multiple'], '#attributes' => [ 'class' => ['default-checkboxes'], - ] + ], ]; $form['group_info']['add_group'] = [ diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php index ed19bee6ae67d037034ccdbc476bc0411aaa02f8..d2a6ab099718f7d699924f56dfb0a9d3a50cc79f 100644 --- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php +++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php @@ -300,7 +300,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { // Ensure there is something in the 'value'. $form['value'] = [ '#type' => 'value', - '#value' => NULL + '#value' => NULL, ]; } } diff --git a/core/modules/views/src/Plugin/views/filter/StringFilter.php b/core/modules/views/src/Plugin/views/filter/StringFilter.php index f6b7e248223d4e4347bf3102c443bf4ccbabfb32..f744519272a3f10517e5f8c9d40385067c04acce 100644 --- a/core/modules/views/src/Plugin/views/filter/StringFilter.php +++ b/core/modules/views/src/Plugin/views/filter/StringFilter.php @@ -257,7 +257,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { // Ensure there is something in the 'value'. $form['value'] = [ '#type' => 'value', - '#value' => NULL + '#value' => NULL, ]; } } diff --git a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php index a7ac37d85f71203e43d2f67473ccbbfc813a9604..a0bbedf7315dd95bf08989c9ec8509e1a8ea65ae 100644 --- a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php +++ b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php @@ -226,7 +226,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition // Merge in some default values. $configuration += [ 'type' => 'LEFT', - 'extra_operator' => 'AND' + 'extra_operator' => 'AND', ]; $this->configuration = $configuration; diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index 512a99de8e6431dbc2fcbd797b0cee0942c11cf7..99d0aa81912a7267a60d28fed67598be8bc47153 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -188,7 +188,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o 'link' => NULL, 'table' => $base_table, 'alias' => $base_table, - 'base' => $base_table + 'base' => $base_table, ]; // init the table queue with our primary table. @@ -1045,7 +1045,7 @@ public function addOrderBy($table, $field = NULL, $order = 'ASC', $alias = '', $ $this->orderby[] = [ 'field' => $as, - 'direction' => strtoupper($order) + 'direction' => strtoupper($order), ]; } @@ -1793,7 +1793,7 @@ public function getAggregationInfo() { 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], - ] + ], ]; } diff --git a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php index 568bcd2f31fda9649c582c0e01cf412152a7f035..1510d22e7de83be3cf8bd2708a2f1cd8bf2264ed 100644 --- a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php +++ b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php @@ -53,7 +53,7 @@ public function query() { 'left_field' => $left_field, 'table' => $this->definition['field table'], 'field' => $this->definition['field field'], - 'adjusted' => TRUE + 'adjusted' => TRUE, ]; if (!empty($this->options['required'])) { $first['type'] = 'INNER'; @@ -80,7 +80,7 @@ public function query() { 'left_field' => 'entity_id', 'table' => $this->definition['base'], 'field' => $this->definition['base field'], - 'adjusted' => TRUE + 'adjusted' => TRUE, ]; if (!empty($this->options['required'])) { diff --git a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php index 0b3dcc9a10a984c5bbe20ed64c4a0adce1105e20..890432aa84c32b9ce9822897c7e47b61b934b6fb 100644 --- a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php +++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php @@ -177,7 +177,7 @@ public function getFilters() { 'plugin_id' => 'boolean', 'entity_type' => $this->entityTypeId, 'entity_field' => $field_name, - ] + ], ] + $this->filters; } diff --git a/core/modules/views/src/Tests/FieldApiDataTest.php b/core/modules/views/src/Tests/FieldApiDataTest.php index d2d035cfcc1118d5b4728824df6e746697040ec6..b20a8712e615eb05ef3e0416c8ed7cbfe97ffc55 100644 --- a/core/modules/views/src/Tests/FieldApiDataTest.php +++ b/core/modules/views/src/Tests/FieldApiDataTest.php @@ -45,7 +45,7 @@ protected function setUp($import_test_views = TRUE) { 'field_name' => $field_names[0], 'entity_type' => 'node', 'bundle' => 'page', - 'label' => 'GiraffeA" label' + 'label' => 'GiraffeA" label', ]; FieldConfig::create($field)->save(); @@ -55,7 +55,7 @@ protected function setUp($import_test_views = TRUE) { 'field_name' => $field_names[0], 'entity_type' => 'node', 'bundle' => 'article', - 'label' => 'GiraffeB" label' + 'label' => 'GiraffeB" label', ])->save(); // Now create some example nodes/users for the view result. @@ -230,7 +230,7 @@ public function testViewsData() { 'field_name' => $this->fieldStorages[0]->getName(), 'entity_type' => 'node', 'bundle' => 'news', - 'label' => 'GiraffeB" label' + 'label' => 'GiraffeB" label', ])->save(); $this->container->get('views.views_data')->clear(); $data = $this->getViewsData(); diff --git a/core/modules/views/src/Tests/ViewTestData.php b/core/modules/views/src/Tests/ViewTestData.php index 27ddf7c46552c7d27aa419f24a8d929040b0bd30..f0c8cfce7d9f310380389f47de219b87396a7c3b 100644 --- a/core/modules/views/src/Tests/ViewTestData.php +++ b/core/modules/views/src/Tests/ViewTestData.php @@ -108,7 +108,7 @@ public static function schemaDefinition() { ], 'primary key' => ['id'], 'unique keys' => [ - 'name' => ['name'] + 'name' => ['name'], ], 'indexes' => [ 'ages' => ['age'], diff --git a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php index 230e4285036d29c565adff25549ca75b2bf58599..71aa2defcc5e63ed9f2dfc1454266b03b8c92603 100644 --- a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php +++ b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php @@ -60,7 +60,7 @@ public function addWhere($group, $field, $value = NULL, $operator = NULL) { $this->conditions[] = [ 'field' => $field, 'value' => $value, - 'operator' => $operator + 'operator' => $operator, ]; } diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.install b/core/modules/views/tests/modules/views_test_data/views_test_data.install index 3590440b9fa0993a99394f68399cd3c78441ee2a..1ef60361cd33ce523ded6287070d6c035afc60e3 100644 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.install +++ b/core/modules/views/tests/modules/views_test_data/views_test_data.install @@ -29,7 +29,7 @@ function views_test_data_install() { 'p' => 'P', 'strong' => 'STRONG', 'em' => 'EM', - 'marquee' => 'MARQUEE' + 'marquee' => 'MARQUEE', ]; \Drupal::configFactory()->getEditable('views.settings')->set('field_rewrite_elements', $values)->save(); } diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php index c3e8f56dbf540bb916bdad84a6c5c288525de6b1..b6120707d98c629fad5fe2e577be5fd037e441cd 100644 --- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php +++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php @@ -96,7 +96,7 @@ protected function setUp($import_test_views = TRUE) { 'status' => CommentInterface::PUBLISHED, 'entity_id' => $node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', ]; Comment::create($comment)->save(); diff --git a/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php index a46e54c9e5817b46e4782675021949cd8ff17514..2393b6d2699390a035c1ff7d126062d63b00b882 100644 --- a/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php +++ b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php @@ -65,7 +65,7 @@ public function testGetEntity() { 'uid' => $account->id(), 'entity_id' => $node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', ]); $comment->save(); diff --git a/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php index 993293cebf48e85e837be085e72882e7357ee547..22bb6435c87df83f94a8510e5ea01feeb35c09f6 100644 --- a/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php +++ b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php @@ -81,7 +81,7 @@ public function testFilterEntity() { 'node.type.test_bundle_2', ], 'module' => [ - 'node' + 'node', ], ]; $this->assertIdentical($expected, $view->getDependencies()); diff --git a/core/modules/views/tests/src/Functional/GlossaryTest.php b/core/modules/views/tests/src/Functional/GlossaryTest.php index 276737f1980cdb5b6880c3d77f13cd8fff74aa1f..ed247f1829bc1de8cb0968d4d6b68a1513053735 100644 --- a/core/modules/views/tests/src/Functional/GlossaryTest.php +++ b/core/modules/views/tests/src/Functional/GlossaryTest.php @@ -40,7 +40,7 @@ public function testGlossaryView() { $nodes_by_char = []; foreach ($nodes_per_char as $char => $count) { $setting = [ - 'type' => $type->id() + 'type' => $type->id(), ]; for ($i = 0; $i < $count; $i++) { $node = $setting; diff --git a/core/modules/views/tests/src/Functional/Handler/AreaTest.php b/core/modules/views/tests/src/Functional/Handler/AreaTest.php index cf877d137493b3cc030718254e3a5d8d928be75a..1827319bbd05d48a6181cd788ed8d143d09d33d4 100644 --- a/core/modules/views/tests/src/Functional/Handler/AreaTest.php +++ b/core/modules/views/tests/src/Functional/Handler/AreaTest.php @@ -41,8 +41,8 @@ protected function viewsData() { 'title' => 'Test Example area', 'help' => 'A area handler which just exists for tests.', 'area' => [ - 'id' => 'test_example' - ] + 'id' => 'test_example', + ], ]; return $data; diff --git a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php index 41849b254952589002a7e89fb640cd5f9fda4390..eda5b81abe1f4ae8c1220f1b21d1a881de39a461 100644 --- a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php +++ b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php @@ -483,7 +483,7 @@ public function testFieldClasses() { 'p', 'strong', 'em', - 'marquee' + 'marquee', ]; $this->assertEqual(array_keys($element_types), $expected_elements); @@ -580,28 +580,28 @@ public function testTextRendering() { [ 'value' => $random_text_8, 'trimmed_value' => '', - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string with two words which doesn't fit both into the limit. [ 'value' => $random_text_8 . ' ' . $random_text_8, 'trimmed_value' => '', - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string which contains of two words, of which only the first // fits into the limit. [ 'value' => $random_text_4 . ' ' . $random_text_8, 'trimmed_value' => $random_text_4, - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string which contains of two words, of which both fits into // the limit. [ 'value' => $random_text_2 . ' ' . $random_text_2, 'trimmed_value' => $random_text_2 . ' ' . $random_text_2, - 'trimmed' => FALSE - ] + 'trimmed' => FALSE, + ], ]; foreach ($tuples as $tuple) { diff --git a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php index 816af901fde0007daf90f2c71d1c2d92fd6d0b9d..b12e43e857c26d89b84994afa530746686dcea86 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php @@ -55,9 +55,9 @@ public function testArgumentDefaultPlugin() { $options = [ 'default_argument_type' => 'argument_default_test', 'default_argument_options' => [ - 'value' => 'John' + 'value' => 'John', ], - 'default_action' => 'default' + 'default_action' => 'default', ]; $id = $view->addHandler('default', 'argument', 'views_test_data', 'name', $options); $view->initHandlers(); diff --git a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php index f8ce5a927f1834aca673088efcff7bd3ae3b687b..c919bcb8312fdb6693739b0b07071020b3408298 100644 --- a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php @@ -51,8 +51,8 @@ public function testCacheOutputOnPage() { 'type' => 'time', 'options' => [ 'results_lifespan' => '3600', - 'output_lifespan' => '3600' - ] + 'output_lifespan' => '3600', + ], ]); $view->save(); $this->container->get('router.builder')->rebuildIfNeeded(); @@ -70,7 +70,7 @@ public function testCacheOutputOnPage() { 'config:user.role.anonymous', 'config:views.view.test_display', 'node_list', - 'rendered' + 'rendered', ]; $this->assertCacheTags($cache_tags); diff --git a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php index 215ee2890f51c157e00d4824bb0c3361c141c843..41356b69c76fc34db5abe31db0a28270ded603ec 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php @@ -110,7 +110,7 @@ public function testBlockContext() { 'label_display' => 'visible', 'views_label' => '', 'items_per_page' => 'none', - 'context_mapping' => ['nid' => '@node.node_route_context:node'] + 'context_mapping' => ['nid' => '@node.node_route_context:node'], ]; $this->assertEqual($block->getPlugin()->getConfiguration(), $expected_settings, 'Block settings are correct.'); diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php index 674815298762cbd114ebd9d6476d57ed38ecfee8..d8deaa598b860e1daf4e0363fd97b80b3ecdc91b 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php @@ -285,7 +285,7 @@ public function testOutputIsEmpty() { 'table' => 'views_test_data', 'field' => 'id', 'id' => 'id', - 'value' => ['value' => 7297] + 'value' => ['value' => 7297], ]; $view->setHandler('default', 'filter', 'id', $item); $this->executeView($view); diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php index eaa5aaa32f31f923e7834419dc8ed2b0eae6e806..4cd81d2891c289ba6f8546deff349fa0298e6556 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php @@ -104,9 +104,9 @@ public function testExposedIdentifier() { 'label' => 'Content: Type', 'operator_id' => 'type_op', 'reduce' => FALSE, - 'description' => 'Exposed overridden description' + 'description' => 'Exposed overridden description', ], - ] + ], ]); $view->save(); $this->drupalGet('test_exposed_form_buttons', ['query' => [$identifier => 'article']]); @@ -131,9 +131,9 @@ public function testExposedIdentifier() { 'label' => 'Content: Type', 'operator_id' => 'type_op', 'reduce' => FALSE, - 'description' => 'Exposed overridden description' + 'description' => 'Exposed overridden description', ], - ] + ], ]); $this->executeView($view); @@ -286,7 +286,7 @@ public function testExposedSortAndItemsPerPage() { 'entity_test_view_grants', 'theme', 'url.query_args', - 'languages:language_content' + 'languages:language_content', ]; $this->drupalGet('test_exposed_form_sort_items_per_page'); diff --git a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php index c80fa09bfc29fb02a0753a98bf0ddd132ce4dfb5..272a3f073dfdc42e300b21c2244444e38f84fd03 100644 --- a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php @@ -418,7 +418,7 @@ public function testPagerLocale() { // Create source string. $source = $this->localeStorage->createString( [ - 'source' => $label + 'source' => $label, ] ); $source->save(); diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php index 1b3078b54494e53c06918f4bcbbd9b9b5065f7b5..e3faa88405fd8cbb5fa8eb017b9b56f9658873ba 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php @@ -41,7 +41,7 @@ public function testBulkSelection() { $node_1 = $this->drupalCreateNode([ 'type' => 'page', 'title' => 'The first node', - 'changed' => \Drupal::time()->getRequestTime() - 180 + 'changed' => \Drupal::time()->getRequestTime() - 180, ]); // Login as administrator and go to admin/content. @@ -53,7 +53,7 @@ public function testBulkSelection() { $node_2 = $this->drupalCreateNode([ 'type' => 'page', 'title' => 'The second node', - 'changed' => \Drupal::time()->getRequestTime() - 120 + 'changed' => \Drupal::time()->getRequestTime() - 120, ]); // Now click 'Apply to selected items' and assert the first node is selected diff --git a/core/modules/views/tests/src/Functional/Update/ArgumentPlaceholderUpdatePathTest.php b/core/modules/views/tests/src/Functional/Update/ArgumentPlaceholderUpdatePathTest.php index 8d60f358b9b056c9eb0bc267da30eda2ad02c93e..fd12451b1a422cbe617b8557e7445035dac0ab3c 100644 --- a/core/modules/views/tests/src/Functional/Update/ArgumentPlaceholderUpdatePathTest.php +++ b/core/modules/views/tests/src/Functional/Update/ArgumentPlaceholderUpdatePathTest.php @@ -20,7 +20,7 @@ class ArgumentPlaceholderUpdatePathTest extends UpdatePathTestBase { protected function setDatabaseDumpFiles() { $this->databaseDumpFiles = [ __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', - __DIR__ . '/../../../fixtures/update/argument-placeholder.php' + __DIR__ . '/../../../fixtures/update/argument-placeholder.php', ]; } diff --git a/core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php b/core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php index 5db54d2c67ecee433456b7688ed7cb517be0cb8d..653025202f3494e33b23a991e35e1021c4daf8ae 100644 --- a/core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php +++ b/core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php @@ -18,7 +18,7 @@ class BulkFormUpdateTest extends UpdatePathTestBase { protected function setDatabaseDumpFiles() { $this->databaseDumpFiles = [ __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', - __DIR__ . '/../../../fixtures/update/legacy-bulk-form-update.php' + __DIR__ . '/../../../fixtures/update/legacy-bulk-form-update.php', ]; } diff --git a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php index 32aac174c4fe51d9edbb9e1773ebd2306a717a37..34f58122cafb799541c8077cb8afc2cf4e5fe0e1 100644 --- a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php +++ b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php @@ -89,7 +89,7 @@ public function testGetDependencies() { 'comment', 'node', 'user', - ] + ], ]; // Tests dependencies of relationships. $expected['test_relationship_dependency'] = [ @@ -97,7 +97,7 @@ public function testGetDependencies() { 'comment', 'node', 'user', - ] + ], ]; $expected['test_plugin_dependencies'] = [ 'module' => [ @@ -108,24 +108,24 @@ public function testGetDependencies() { 'RowTest', 'StaticTest', 'StyleTest', - ] + ], ]; $expected['test_argument_dependency'] = [ 'config' => [ 'core.entity_view_mode.node.teaser', - 'field.storage.node.body' + 'field.storage.node.body', ], 'content' => [ 'ArgumentDefaultTest', - 'ArgumentValidatorTest' + 'ArgumentValidatorTest', ], 'module' => [ 'node', // The argument handler is provided by the search module. 'search', 'text', - 'user' + 'user', ], ]; @@ -145,25 +145,25 @@ public function testGetDependencies() { ], 'content' => [ 'ArgumentDefaultTest', - 'ArgumentValidatorTest' + 'ArgumentValidatorTest', ], 'module' => [ 'core', 'node', 'search', 'user', - 'views' + 'views', ], ]; $expected_display['page'] = [ 'config' => [ - 'field.storage.node.body' + 'field.storage.node.body', ], 'module' => [ 'core', 'node', 'text', - 'views' + 'views', ], ]; diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php index 0f209cac2ebd934304919c5604bba3f7770f9359..a113f0c4ffd6c1001f01b8658382a15cd78781ca 100644 --- a/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php @@ -35,8 +35,8 @@ protected function viewsData() { 'title' => 'Test Example area', 'help' => 'A area handler which just exists for tests.', 'area' => [ - 'id' => 'test_example' - ] + 'id' => 'test_example', + ], ]; return $data; diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php index b5c52fef7727b04d2b1d107736e805414b890891..dbd04d83374df11c71c2ad0c241b6d557dae9453 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php @@ -62,7 +62,7 @@ public function testSimple() { 'table' => 'views', 'field' => 'counter', 'relationship' => 'none', - 'counter_start' => $rand_start + 'counter_start' => $rand_start, ], 'name' => [ 'id' => 'name', diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php index 8bdab81b63449c61a1d03b13363e9576eb7d830b..a738dcf5e3e690c5bae2f0272b941107f1366c6c 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php @@ -82,7 +82,7 @@ protected function setUp($import_test_views = TRUE) { $this->testUsers[$i] = User::create([ 'name' => 'test ' . $i, 'timezone' => User::getAllowedTimezones()[$i], - 'created' => REQUEST_TIME - rand(0, 3600) + 'created' => REQUEST_TIME - rand(0, 3600), ]); $this->testUsers[$i]->save(); } @@ -279,8 +279,8 @@ public function testAttachedRender() { $render = $executable->display_handler->render(); $expected_attachments = [ 'library' => [ - 'views/views.module' - ] + 'views/views.module', + ], ]; foreach ($this->entities as $entity) { $expected_attachments['library'][] = 'foo/fake_library'; diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php index aefa4841e64f4744369dcce769797ff2404a9662..f3ea97ca18166e3d81e0cd520ddc72066528de88 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php @@ -809,7 +809,7 @@ public function testTrimText() { 'khoảng cách từ đại lí đến', 'của hãng bao gồm ba dòng', 'сд асд асд ас', - 'асд асд асд ас' + 'асд асд асд ас', ]; // Just test maxlength without word boundary. $alter = [ diff --git a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php index e49ef7a2c7738e9b37618a883d46598ce419982b..ac8000a8d8980a42d98052ffdbecfe99d24167e3 100644 --- a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php @@ -59,7 +59,7 @@ protected function setUp($import_test_views = TRUE) { 'entity_type' => 'node', 'bundle' => 'article', 'label' => 'Translated text', - 'translatable' => TRUE + 'translatable' => TRUE, ])->save(); FieldStorageConfig::create([ diff --git a/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php b/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php index 34d426dc761e706cc8ea7c0111df878f20a93095..82876f1e3eef6950c48e3739426806a71455f421 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php @@ -41,8 +41,8 @@ public function testArgumentValidatorPlugin() { $options = [ 'specify_validation' => TRUE, 'validate' => [ - 'type' => 'argument_validator_test' - ] + 'type' => 'argument_validator_test', + ], ]; $id = $view->addHandler('default', 'argument', 'views_test_data', 'name', $options); $view->initHandlers(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php index 1a9f32eff7b2dd940949ad5a832496b669668be8..5b634afa1c72a868186564a55b83e172181a2989 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php @@ -37,7 +37,7 @@ public function testExposedBlock() { $expected = [ 'config' => ['views.view.test_exposed_block'], 'module' => ['views'], - 'theme' => ['stark'] + 'theme' => ['stark'], ]; $this->assertIdentical($expected, $dependencies); } @@ -53,7 +53,7 @@ public function testViewsBlock() { $expected = [ 'config' => ['views.view.content_recent'], 'module' => ['views'], - 'theme' => ['stark'] + 'theme' => ['stark'], ]; $this->assertIdentical($expected, $dependencies); } diff --git a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php index 708b4046c805f0a30542cceb2e55773a5c95887e..caa479b4a10193147233a26dfeaebf78ab1555d6 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php @@ -74,7 +74,7 @@ public function testTimeResultCaching() { 'options' => [ 'results_lifespan' => '3600', 'output_lifespan' => '3600', - ] + ], ]); // Test the default (non-paged) display. @@ -188,7 +188,7 @@ public function testTimeResultCachingWithPager() { 'options' => [ 'results_lifespan' => '3600', 'output_lifespan' => '3600', - ] + ], ]); $mapping = ['views_test_data_name' => 'name']; @@ -271,7 +271,7 @@ public function testHeaderStorage() { 'type' => 'time', 'options' => [ 'output_lifespan' => '3600', - ] + ], ]); $output = $view->buildRenderable(); @@ -330,7 +330,7 @@ public function testCacheData() { 'options' => [ 'results_lifespan' => '3600', 'output_lifespan' => '3600', - ] + ], ]); $this->executeView($view); @@ -392,9 +392,9 @@ public function testArgumentDefaultCache() { $options = [ 'default_argument_type' => 'argument_default_test', 'default_argument_options' => [ - 'value' => 'John' + 'value' => 'John', ], - 'default_action' => 'default' + 'default_action' => 'default', ]; $view->addHandler('default', 'argument', 'views_test_data', 'name', $options); $view->initHandlers(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php index d08adaacb053d360734af475d0d2b87396f98239..a6776b585a1f66fcae128b7ebdb79390e632895a 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php @@ -17,7 +17,7 @@ class ViewsMenuLinkTest extends ViewsKernelTestBase { public static $modules = [ 'menu_ui', 'user', - 'views' + 'views', ]; /** diff --git a/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php b/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php index 940ab7acad14768bd5f7a1c9799aab9ecaf71091..34e4f93000dda44e33d0747b91f1127ad01dcc3d 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php @@ -88,12 +88,12 @@ public function testBase() { $configuration['extra'] = [ [ 'field' => 'name', - 'value' => $random_name_1 + 'value' => $random_name_1, ], [ 'field' => 'name', 'value' => $random_name_2, - 'operator' => '<>' + 'operator' => '<>', ], ]; $join_info = $this->buildJoin($view, $configuration, 'users3'); @@ -110,7 +110,7 @@ public function testBase() { $configuration['extra'] = [ [ 'field' => 'name', - 'value' => $random_name_1 + 'value' => $random_name_1, ], [ 'field' => 'name', diff --git a/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php b/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php index 1c196a1d98fd01cdd6944829724af6dd05d38c8c..1086612ae882eb7bc318e0f0a8d63c4c403ba370 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php @@ -129,12 +129,12 @@ public function testBasePlugin() { $configuration['extra'] = [ [ 'field' => 'name', - 'value' => $random_name_1 + 'value' => $random_name_1, ], [ 'field' => 'name', 'value' => $random_name_2, - 'operator' => '<>' + 'operator' => '<>', ], ]; $join = $this->manager->createInstance('standard', $configuration); @@ -156,7 +156,7 @@ public function testBasePlugin() { $configuration['extra'] = [ [ 'field' => 'name', - 'value' => $random_name_1 + 'value' => $random_name_1, ], [ 'field' => 'name', @@ -178,7 +178,7 @@ public function testBasePlugin() { $configuration['extra'] = [ [ 'field' => 'langcode', - 'value' => 'en' + 'value' => 'en', ], [ 'left_field' => 'status', @@ -187,7 +187,7 @@ public function testBasePlugin() { ], [ 'field' => 'name', - 'left_field' => 'name' + 'left_field' => 'name', ], ]; $join = $this->manager->createInstance('standard', $configuration); diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php index 19d5e9554bd09bac2611153c0af389701a1cf796..191024e4701e091dd6c46ad7be530d7d81efe399 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php +++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php @@ -55,7 +55,7 @@ protected function schemaDefinition() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default' => 0 + 'default' => 0, ]; return $schema; @@ -74,8 +74,8 @@ protected function viewsData() { 'relationship' => [ 'id' => 'standard', 'base' => 'users_field_data', - 'base field' => 'uid' - ] + 'base field' => 'uid', + ], ]; return $data; diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php index 802befe1ca76d19ad60d9db5f923948c4b91a722..973462619a2a4bf540a63e63815109c3e11f7fa4 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php @@ -78,8 +78,8 @@ public function testRelationshipQuery() { $expected_result = [ [ 'name' => 'John', - 'uid' => 1 - ] + 'uid' => 1, + ], ]; $this->assertIdenticalResultset($view, $expected_result, $this->columnMap); $view->destroy(); @@ -101,8 +101,8 @@ public function testRelationshipQuery() { $expected_result = [ [ 'name' => 'John', - 'uid' => 1 - ] + 'uid' => 1, + ], ]; $this->assertIdenticalResultset($view, $expected_result, $this->columnMap); $view->destroy(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php index 879f6d44d540bea72a4f155837167174a491709f..7c49327290aa0bf363a0008b17f2e58ac0f94345 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php @@ -103,7 +103,7 @@ public function testBuildWithTitleOverride() { 'title' => 'Overridden title', 'default_argument_type' => 'fixed', 'default_argument_options' => [ - 'argument' => 'fixed' + 'argument' => 'fixed', ], 'validate' => [ 'type' => 'none', @@ -113,7 +113,7 @@ public function testBuildWithTitleOverride() { 'table' => 'views_test_data', 'field' => 'name', 'plugin_id' => 'string', - ] + ], ]); $view->save(); diff --git a/core/modules/views/tests/src/Kernel/ViewStorageTest.php b/core/modules/views/tests/src/Kernel/ViewStorageTest.php index 7cf953af740b0682b5349f5fc82e6e9a40db0fd5..e6cce86f2eff9582295656627bfc3e35a1f55137 100644 --- a/core/modules/views/tests/src/Kernel/ViewStorageTest.php +++ b/core/modules/views/tests/src/Kernel/ViewStorageTest.php @@ -183,22 +183,22 @@ protected function displayMethodTests() { 'display_plugin' => 'page', 'id' => 'page_2', 'display_title' => 'Page 1', - 'position' => 1 + 'position' => 1, ], 'feed_1' => [ 'display_options' => ['path' => 'test.xml'], 'display_plugin' => 'feed', 'id' => 'feed', 'display_title' => 'Feed', - 'position' => 2 + 'position' => 2, ], 'page_2' => [ 'display_options' => ['path' => 'test/%/extra'], 'display_plugin' => 'page', 'id' => 'page_2', 'display_title' => 'Page 2', - 'position' => 3 - ] + 'position' => 3, + ], ]; $view = $this->controller->create($config); @@ -275,8 +275,8 @@ protected function displayMethodTests() { $options = [ 'alter' => [ - 'text' => $this->randomMachineName() - ] + 'text' => $this->randomMachineName(), + ], ]; $id2 = $view->addHandler($display_id, 'field', 'views_test_data', 'name', $options); $item2 = $view->getHandler($display_id, 'field', 'name'); @@ -296,7 +296,7 @@ protected function displayMethodTests() { $item = [ 'alter' => [ 'text' => $this->randomMachineName(), - ] + ], ] + $item1; $expected_items[$id1] = $item; $view->setHandler($display_id, 'field', $id1, $item); diff --git a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php index a581c862a1871bd4b2444846eb343d41beacdf6a..956f7dc0c18ddec7d682cc65948bbad7adc0aef1 100644 --- a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php +++ b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php @@ -457,7 +457,7 @@ public function testBaseTableFields() { ->setLabel('ID') ->setDescription('The ID of the user entity.') ->setReadOnly(TRUE) - ->setSetting('unsigned', TRUE) + ->setSetting('unsigned', TRUE), ]; $this->entityManager->expects($this->any()) ->method('getBaseFieldDefinitions') @@ -578,7 +578,7 @@ public function testDataTableFields() { ->setLabel('ID') ->setDescription('The ID of the user entity.') ->setReadOnly(TRUE) - ->setSetting('unsigned', TRUE) + ->setSetting('unsigned', TRUE), ]; $entity_test_type = new ConfigEntityType(['id' => 'entity_test_bundle']); @@ -730,7 +730,7 @@ public function testRevisionTableFields() { ->setLabel('ID') ->setDescription('The ID of the user entity.') ->setReadOnly(TRUE) - ->setSetting('unsigned', TRUE) + ->setSetting('unsigned', TRUE), ]; $this->entityManager->expects($this->any()) ->method('getBaseFieldDefinitions') diff --git a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php index 7ecf9ef0417a9f62e8ba42882b8ade0c2c9040da..c63258abdcbe570c9fc6c135bfe6a71157c571aa 100644 --- a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php @@ -39,7 +39,7 @@ class ViewsLocalTaskTest extends UnitTestCase { protected $baseDefinition = [ 'class' => '\Drupal\views\Plugin\Menu\LocalTask\ViewsLocalTask', - 'deriver' => '\Drupal\views\Plugin\Derivative\ViewsLocalTask' + 'deriver' => '\Drupal\views\Plugin\Derivative\ViewsLocalTask', ]; /** diff --git a/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php index ac5a1fe4b9392386b8422c6c5383a4289b26ddaa..ec79b52d94c8ec8c32edcfc68aa9f42253ef76d9 100644 --- a/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php @@ -44,7 +44,7 @@ public function testGetEntityTypeForFieldOnBaseTable() { ->method('get') ->with('test_entity_type_table') ->willReturn([ - 'table' => ['entity type' => 'test_entity_type'] + 'table' => ['entity type' => 'test_entity_type'], ]); $handler->setViewsData($this->viewsData); diff --git a/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php b/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php index 98a155466928310db57c5f4bcc1d453a3bf0bb73..c3c180adac0c4fa98cb42858f768e3d794fa614b 100644 --- a/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php @@ -54,7 +54,7 @@ public function testCalculateDependencies() { ->method('load') ->willReturnMap([ ['this', $view_this], - ['other', $view_other] + ['other', $view_other], ]); $this->viewHandler->view->storage = $view_this; diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php index 2b929f3608764db15dc2addb323f1425f2c1c329..b12b49ce417bd2fe2d3119c76cdbd2124f7416f2 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php @@ -118,7 +118,7 @@ public function testConstruct() { public function testDefineOptionsWithNoOptions() { $definition = [ 'entity_type' => 'test_entity', - 'field_name' => 'title' + 'field_name' => 'title', ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -147,7 +147,7 @@ public function testDefineOptionsWithDefaultFormatterOnFieldDefinition() { 'entity_type' => 'test_entity', 'field_name' => 'title', 'default_formatter' => 'test_example', - 'default_formatter_settings' => ['link_to_entity' => TRUE] + 'default_formatter_settings' => ['link_to_entity' => TRUE], ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -174,7 +174,7 @@ public function testDefineOptionsWithDefaultFormatterOnFieldType() { $definition = [ 'entity_type' => 'test_entity', 'field_name' => 'title', - 'default_formatter_settings' => ['link_to_entity' => TRUE] + 'default_formatter_settings' => ['link_to_entity' => TRUE], ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -200,7 +200,7 @@ public function testDefineOptionsWithDefaultFormatterOnFieldType() { public function testCalculateDependenciesWithBaseField() { $definition = [ 'entity_type' => 'test_entity', - 'field_name' => 'title' + 'field_name' => 'title', ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -222,7 +222,7 @@ public function testCalculateDependenciesWithBaseField() { public function testCalculateDependenciesWithConfiguredField() { $definition = [ 'entity_type' => 'test_entity', - 'field_name' => 'body' + 'field_name' => 'body', ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -263,7 +263,7 @@ public function testAccess() { ->method('get') ->with('test_entity_table') ->willReturn([ - 'table' => ['entity type' => 'test_entity'] + 'table' => ['entity type' => 'test_entity'], ]); $access_control_handler = $this->getMock('Drupal\Core\Entity\EntityAccessControlHandlerInterface'); diff --git a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php index ef0e812aa2558a7db492d4fd94aa8c420beb280b..d94840746b39520b0168dc4da4406a86e4127df2 100644 --- a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php @@ -196,7 +196,7 @@ public function providerTestHasMoreRecords() { // Now we are on the second page, which has just a single one left. [5, 6, 1, FALSE], // Increase the total items, so we have some available on the third page. - [5, 12, 1, TRUE] + [5, 12, 1, TRUE], ]; } diff --git a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php index 0900df69247b4eea5679c4ac470e9955c8b0ca09..022f5320dbc9e30700ea01b8eb263f2a018a7981 100644 --- a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php @@ -116,7 +116,7 @@ public function testRenderWithDestination() { $expected_build = [ '#type' => 'operations', - '#links' => $operations + '#links' => $operations, ]; $expected_build['#links']['foo']['query'] = ['destination' => 'foobar']; $build = $this->plugin->render($result); @@ -158,7 +158,7 @@ public function testRenderWithoutDestination() { $expected_build = [ '#type' => 'operations', - '#links' => $operations + '#links' => $operations, ]; $build = $this->plugin->render($result); $this->assertSame($expected_build, $build); diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php index f29650796c5631bd14f443166ff75abfaa85c5cc..749a1efffaccc73bf17860907a409206770d2dbe 100644 --- a/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php @@ -66,7 +66,7 @@ public function providerTestGetDateFormat() { ['foo.field', 'Y-y-M-m', "strftime('%Y-%Y-%m-%m', foo.field, 'unixepoch')"], ['bar.field', 'n-F D d l', "strftime('%m-%m %d %d %d', bar.field, 'unixepoch')"], ['baz.bar_field', 'j/W/H-h i s A', "strftime('%d/%W/%H-%H %M %S ', baz.bar_field, 'unixepoch')"], - ['foo.field', 'W', "CAST(((strftime('%j', date(strftime('%Y-%m-%d', foo.field, 'unixepoch'), '-3 days', 'weekday 4')) - 1) / 7 + 1) AS NUMERIC)"] + ['foo.field', 'W', "CAST(((strftime('%j', date(strftime('%Y-%m-%d', foo.field, 'unixepoch'), '-3 days', 'weekday 4')) - 1) / 7 + 1) AS NUMERIC)"], ]; } diff --git a/core/modules/views/tests/src/Unit/PluginBaseTest.php b/core/modules/views/tests/src/Unit/PluginBaseTest.php index 622b42a84642d9952bd113e1ce9a1f2eaf28dabd..afa849f8c8c04f72e1f4cab354d598e9434e025c 100644 --- a/core/modules/views/tests/src/Unit/PluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/PluginBaseTest.php @@ -101,7 +101,7 @@ public function providerTestUnpackOptions() { 'expected' => [ 'key' => 'value2', ], - '' + '', ]; // Set no storage but an options value, so the options value should be kept. $test_parameters[] = [ diff --git a/core/modules/views/tests/src/Unit/ViewExecutableTest.php b/core/modules/views/tests/src/Unit/ViewExecutableTest.php index b6d3c912b01aecd72ebf2109971ca07dde72356a..a86ead11563acf00b7c79f77bb94cbed58694837 100644 --- a/core/modules/views/tests/src/Unit/ViewExecutableTest.php +++ b/core/modules/views/tests/src/Unit/ViewExecutableTest.php @@ -295,7 +295,7 @@ public function testBuildThemeFunctions() { unset($view->display_handler); $expected = [ 'test_hook__test_view', - 'test_hook' + 'test_hook', ]; $this->assertEquals($expected, $view->buildThemeFunctions('test_hook')); @@ -307,7 +307,7 @@ public function testBuildThemeFunctions() { 'test_hook__two', 'test_hook__and_three', 'test_hook__test_view', - 'test_hook' + 'test_hook', ]; $this->assertEquals($expected, $view->buildThemeFunctions('test_hook')); @@ -323,7 +323,7 @@ public function testBuildThemeFunctions() { 'test_hook__test_view__default2', 'test_hook__default2', 'test_hook__test_view', - 'test_hook' + 'test_hook', ]; $this->assertEquals($expected, $view->buildThemeFunctions('test_hook')); } diff --git a/core/modules/views/tests/src/Unit/ViewsTest.php b/core/modules/views/tests/src/Unit/ViewsTest.php index 00476c50d1e1c6200d75507dd1822e6550285e79..e94068f051f2bf61e866cb85005979c241ca8d94 100644 --- a/core/modules/views/tests/src/Unit/ViewsTest.php +++ b/core/modules/views/tests/src/Unit/ViewsTest.php @@ -123,7 +123,7 @@ public function testGetApplicableViews($applicable_type, $expected) { 'type_a' => [ 'display_plugin' => 'type_a', 'display_options' => [ - 'enabled' => FALSE + 'enabled' => FALSE, ], ], // Type D intentionally doesn't exist. diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index a26742b91c1a3b7fa4b330b786884cb245e9a384..f3f287e7552a248366d0fe9dadfd56696cb345b9 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -575,12 +575,12 @@ function template_preprocess_views_view_table(&$variables) { if (!empty($column_reference['content']) && !empty($options['info'][$column]['separator'])) { $column_reference['content'][] = [ 'separator' => ['#markup' => $options['info'][$column]['separator']], - 'field_output' => ['#markup' => $field_output] + 'field_output' => ['#markup' => $field_output], ]; } else { $column_reference['content'][] = [ - 'field_output' => ['#markup' => $field_output] + 'field_output' => ['#markup' => $field_output], ]; } } diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc index 1b8b88ff94b608fbed71bb3e5ed2af3db9aebda7..63c61902c48fab1db607526da275cae370fbf040 100644 --- a/core/modules/views_ui/admin.inc +++ b/core/modules/views_ui/admin.inc @@ -286,7 +286,7 @@ function views_ui_build_form_url(FormStateInterface $form_state) { $route_parameters = [ 'js' => $ajax, 'view' => $name, - 'display_id' => $display_id + 'display_id' => $display_id, ]; $url = Url::fromRoute($route_name, $route_parameters); if ($type = $form_state->get('type')) { diff --git a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php index 534006cb3d0ddb987352494194344b2a2f000b1c..f6efde472934d0e041bd7069031e82867a9ff4d9 100644 --- a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php +++ b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php @@ -78,7 +78,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#default_value' => array_filter($config->get('display_extenders')), '#options' => $options, '#type' => 'checkboxes', - '#description' => $this->t('Select extensions of the views interface.') + '#description' => $this->t('Select extensions of the views interface.'), ]; } diff --git a/core/modules/views_ui/src/Form/Ajax/Rearrange.php b/core/modules/views_ui/src/Form/Ajax/Rearrange.php index b2b1e8e80d12739359207751b77d5350bbce3566..c904ff374e8dc601e406ab4341ff74242fb0f186 100644 --- a/core/modules/views_ui/src/Form/Ajax/Rearrange.php +++ b/core/modules/views_ui/src/Form/Ajax/Rearrange.php @@ -85,7 +85,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 'action' => 'order', 'relationship' => 'sibling', 'group' => 'weight', - ] + ], ], '#tree' => TRUE, '#prefix' => '
                ', diff --git a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php index 81eb6f21a860d2d4c45187eb63453205ace128e0..7e5f83f7f503682e561cb1bb9e67fb30c643abfc 100644 --- a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php +++ b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php @@ -44,7 +44,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ]); $form['view'] = [ '#type' => 'value', - '#value' => $view + '#value' => $view, ]; $displays = $view->get('display'); @@ -68,7 +68,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 'action' => 'order', 'relationship' => 'sibling', 'group' => 'weight', - ] + ], ], '#tree' => TRUE, '#prefix' => '
                ', diff --git a/core/modules/views_ui/src/Tests/RowUITest.php b/core/modules/views_ui/src/Tests/RowUITest.php index 568900978398139bf8120380f049072125b051ad..e8aa2c31010fe4b040e32718603e78f72eea8834 100644 --- a/core/modules/views_ui/src/Tests/RowUITest.php +++ b/core/modules/views_ui/src/Tests/RowUITest.php @@ -34,13 +34,13 @@ public function testRowUI() { $this->assertFieldByName('row[type]', 'fields', 'The default row plugin selected in the UI should be fields.'); $edit = [ - 'row[type]' => 'test_row' + 'row[type]' => 'test_row', ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->assertFieldByName('row_options[test_option]', NULL, 'Make sure the custom settings form from the test plugin appears.'); $random_name = $this->randomMachineName(); $edit = [ - 'row_options[test_option]' => $random_name + 'row_options[test_option]' => $random_name, ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->drupalGet($row_options_url); diff --git a/core/modules/views_ui/src/ViewPreviewForm.php b/core/modules/views_ui/src/ViewPreviewForm.php index 4bc8eaab3ad3dda49647de4a2eaa37a5314da0f8..787527baf8a9938b6591d8e259458352b736ccd8 100644 --- a/core/modules/views_ui/src/ViewPreviewForm.php +++ b/core/modules/views_ui/src/ViewPreviewForm.php @@ -77,7 +77,7 @@ protected function actions(array $form, FormStateInterface $form_state) { return [ '#attributes' => [ 'id' => 'preview-submit-wrapper', - 'class' => ['preview-submit-wrapper'] + 'class' => ['preview-submit-wrapper'], ], 'button' => [ '#type' => 'submit', diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index beb5ffff475e11d598d639f7b2eab5e95179260d..6b49fdc92d3b8cb22f04c9b63228c46331b37459 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -713,7 +713,7 @@ public function renderPreview($display_id, $args = []) { 'data' => [ '#markup' => $path, ], - ] + ], ]; } if ($show_stats) { diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php index 7291dc2e8de8413a389238b3f3c0b3b691c50a4e..2f007f193c6814ec8f3e5d9834b0e5d68c0f08cf 100644 --- a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php +++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php @@ -208,7 +208,7 @@ public function testDefaultMenuTabRegression() { $edit = [ 'title[0][value]' => 'Menu title', 'link[0][uri]' => '/admin/foo', - 'menu_parent' => 'admin:system.admin' + 'menu_parent' => 'admin:system.admin', ]; $this->drupalPostForm('admin/structure/menu/manage/admin/add', $edit, t('Save')); diff --git a/core/modules/views_ui/tests/src/Functional/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php index 519d5226e7ee7228845f26939c48bc344f7599ed..8fa5a80de387055b3c379ec466992eb12508e3e6 100644 --- a/core/modules/views_ui/tests/src/Functional/DisplayTest.php +++ b/core/modules/views_ui/tests/src/Functional/DisplayTest.php @@ -45,7 +45,7 @@ public function testAddDisplay() { */ public function testReorderDisplay() { $view = [ - 'block[create]' => TRUE + 'block[create]' => TRUE, ]; $view = $this->randomView($view); @@ -60,7 +60,7 @@ public function testReorderDisplay() { // Put the block display in front of the page display. $edit = [ 'displays[page_1][weight]' => 2, - 'displays[block_1][weight]' => 1 + 'displays[block_1][weight]' => 1, ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->drupalPostForm(NULL, [], t('Save')); diff --git a/core/modules/views_ui/tests/src/Functional/HandlerTest.php b/core/modules/views_ui/tests/src/Functional/HandlerTest.php index b4be17828d05fd787b4d7d38d8b0c3b49c0c2fc9..7d96d0c5b57ad7404541e9481c2b36c7d688402b 100644 --- a/core/modules/views_ui/tests/src/Functional/HandlerTest.php +++ b/core/modules/views_ui/tests/src/Functional/HandlerTest.php @@ -53,7 +53,7 @@ protected function schemaDefinition() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default' => 0 + 'default' => 0, ]; return $schema; @@ -74,8 +74,8 @@ protected function viewsData() { 'relationship' => [ 'id' => 'standard', 'base' => 'users_field_data', - 'base field' => 'uid' - ] + 'base field' => 'uid', + ], ]; // Create a dummy field with no help text. @@ -180,14 +180,14 @@ public function testHandlerHelpEscaping() { 'field_name' => 'field_test', 'entity_type' => 'node', 'bundle' => 'page', - 'label' => 'The giraffe" label' + 'label' => 'The giraffe" label', ])->save(); FieldConfig::create([ 'field_name' => 'field_test', 'entity_type' => 'node', 'bundle' => 'article', - 'label' => 'The giraffe" label ' + 'label' => 'The giraffe" label ', ])->save(); $this->drupalGet('admin/structure/views/nojs/add-handler/content/default/field'); diff --git a/core/modules/views_ui/tests/src/Functional/StyleUITest.php b/core/modules/views_ui/tests/src/Functional/StyleUITest.php index 1eb9c7862f4215e2af47a63ced3436f466ce6929..62f682a5f9255c7f48eaa0b4599646bd42c43adc 100644 --- a/core/modules/views_ui/tests/src/Functional/StyleUITest.php +++ b/core/modules/views_ui/tests/src/Functional/StyleUITest.php @@ -33,13 +33,13 @@ public function testStyleUI() { $this->assertFieldByName('style[type]', 'default', 'The default style plugin selected in the UI should be unformatted list.'); $edit = [ - 'style[type]' => 'test_style' + 'style[type]' => 'test_style', ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->assertFieldByName('style_options[test_option]', NULL, 'Make sure the custom settings form from the test plugin appears.'); $random_name = $this->randomMachineName(); $edit = [ - 'style_options[test_option]' => $random_name + 'style_options[test_option]' => $random_name, ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->drupalGet($style_options_url); diff --git a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php index 839fe3a47a993e3787700e6750ef7ae8bfa20ea0..8a2dd2953f3b20c1a858d5a7f30975da94e7c69e 100644 --- a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php +++ b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php @@ -76,7 +76,7 @@ public function testViewsUiTourTipsTranslated() { foreach ($handler_titles as $handler_title) { // Create source string. $source = $this->localeStorage->createString([ - 'source' => $handler_title + 'source' => $handler_title, ]); $source->save(); $this->createTranslation($source, $langcode); diff --git a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php index b4a3df022d32dadb83e655bf1803a87abcd8b922..d448252c6f4ac609e7455c10a2f730a49ed73cac 100644 --- a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php +++ b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php @@ -48,7 +48,7 @@ public function testBuildRowEntityList() { 'theme' => 'views_view', 'no_ui' => TRUE, 'admin' => '', - ] + ], ], [ 'page', @@ -61,7 +61,7 @@ public function testBuildRowEntityList() { 'contextual_links_locations' => ['page'], 'theme' => 'views_view', 'admin' => 'Page admin label', - ] + ], ], [ 'embed', @@ -71,7 +71,7 @@ public function testBuildRowEntityList() { 'title' => 'embed', 'theme' => 'views_view', 'admin' => 'Embed admin label', - ] + ], ], ])); diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index 0475bce698bc515d8986409b0e6217ca251676f2..318d85bd69148d9b3c5482e1464d2eae62791ebe 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -134,7 +134,7 @@ function views_ui_preprocess_views_view(&$variables) { // Render title for the admin preview. if (!empty($view->live_preview)) { $variables['title'] = [ - '#markup' => $view->getTitle() + '#markup' => $view->getTitle(), ]; } diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc index f57132f7af28c80583f2e67a1bbafc225753ef32..69eff489fc4f80fe0e64d2b6482a6a52ed97b7cf 100644 --- a/core/modules/views_ui/views_ui.theme.inc +++ b/core/modules/views_ui/views_ui.theme.inc @@ -184,7 +184,7 @@ function template_preprocess_views_ui_build_group_filter_form(&$variables) { 'action' => 'order', 'relationship' => 'sibling', 'group' => 'weight', - ] + ], ], ]; @@ -353,7 +353,7 @@ function template_preprocess_views_ui_rearrange_filter_form(&$variables) { 'action' => 'order', 'relationship' => 'sibling', 'group' => 'weight', - ] + ], ], ]; } diff --git a/core/modules/workflows/src/Form/WorkflowEditForm.php b/core/modules/workflows/src/Form/WorkflowEditForm.php index 676868d2421104ab308eec7ecc727ad44e1fdc35..d6560f592f5d710eefe23703f502f2b004873fd0 100644 --- a/core/modules/workflows/src/Form/WorkflowEditForm.php +++ b/core/modules/workflows/src/Form/WorkflowEditForm.php @@ -77,7 +77,7 @@ public function form(array $form, FormStateInterface $form_state) { $header = [ 'state' => $this->t('State'), 'weight' => $this->t('Weight'), - 'operations' => $this->t('Operations') + 'operations' => $this->t('Operations'), ]; $form['states_container'] = [ '#type' => 'details', @@ -117,14 +117,14 @@ public function form(array $form, FormStateInterface $form_state) { 'edit' => [ 'title' => $this->t('Edit'), 'url' => Url::fromRoute('entity.workflow.edit_state_form', ['workflow' => $workflow->id(), 'workflow_state' => $state->id()]), - ] + ], ]; if ($this->entity->access('delete-state:' . $state->id())) { $links['delete'] = [ 'title' => t('Delete'), 'url' => Url::fromRoute('entity.workflow.delete_state_form', [ 'workflow' => $workflow->id(), - 'workflow_state' => $state->id() + 'workflow_state' => $state->id(), ]), ]; } @@ -155,7 +155,7 @@ public function form(array $form, FormStateInterface $form_state) { 'weight' => $this->t('Weight'), 'from' => $this->t('From'), 'to' => $this->t('To'), - 'operations' => $this->t('Operations') + 'operations' => $this->t('Operations'), ]; $form['transitions_container'] = [ '#type' => 'details', diff --git a/core/modules/workflows/src/Form/WorkflowStateEditForm.php b/core/modules/workflows/src/Form/WorkflowStateEditForm.php index 7b8b90355ebffa372e9fea7168d7575e0bbc528f..0ecc3cde6beda57ec609112f5da85d7b973a871d 100644 --- a/core/modules/workflows/src/Form/WorkflowStateEditForm.php +++ b/core/modules/workflows/src/Form/WorkflowStateEditForm.php @@ -121,14 +121,14 @@ public function form(array $form, FormStateInterface $form_state) { 'title' => $this->t('Edit'), 'url' => Url::fromRoute('entity.workflow.edit_transition_form', [ 'workflow' => $workflow->id(), - 'workflow_transition' => $transition->id() + 'workflow_transition' => $transition->id(), ]), ]; $links['delete'] = [ 'title' => t('Delete'), 'url' => Url::fromRoute('entity.workflow.delete_transition_form', [ 'workflow' => $workflow->id(), - 'workflow_transition' => $transition->id() + 'workflow_transition' => $transition->id(), ]), ]; $form['transitions'][$transition->id()] = [ @@ -230,8 +230,8 @@ protected function actions(array $form, FormStateInterface $form_state) { ], '#url' => Url::fromRoute('entity.workflow.delete_state_form', [ 'workflow' => $this->entity->id(), - 'workflow_state' => $this->stateId - ]) + 'workflow_state' => $this->stateId, + ]), ]; return $actions; diff --git a/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php b/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php index ac1552ecdd0fa56b4c710ae5622bafc9397ab0de..2d01e4324e43bfb3331d3b6dd300d92a9358eb5b 100644 --- a/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php +++ b/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php @@ -224,8 +224,8 @@ protected function actions(array $form, FormStateInterface $form_state) { ], '#url' => Url::fromRoute('entity.workflow.delete_transition_form', [ 'workflow' => $this->entity->id(), - 'workflow_transition' => $this->transitionId - ]) + 'workflow_transition' => $this->transitionId, + ]), ]; return $actions; diff --git a/core/modules/workflows/src/WorkflowListBuilder.php b/core/modules/workflows/src/WorkflowListBuilder.php index c36171aa6e8422c4153bce7c2c2fd7e139cc6fee..a85ef659fb253eb494d966375f15f3e8d9e0368e 100644 --- a/core/modules/workflows/src/WorkflowListBuilder.php +++ b/core/modules/workflows/src/WorkflowListBuilder.php @@ -73,7 +73,7 @@ public function buildRow(EntityInterface $entity) { $row['label'] = $entity->label(); $row['type']['data'] = [ - '#markup' => $entity->getTypePlugin()->label() + '#markup' => $entity->getTypePlugin()->label(), ]; $items = array_map([State::class, 'labelCallback'], $entity->getTypePlugin()->getStates()); diff --git a/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php b/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php index f2d394c40605de44f58b6bb22071a9a0a5a60649..21227d7c7a8dfc0fbf1a4940465ffb8de25d3efa 100644 --- a/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php +++ b/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php @@ -125,7 +125,7 @@ protected function getExpectedNormalizedEntity() { ], 'uuid' => [ [ - 'value' => $this->entity->uuid() + 'value' => $this->entity->uuid(), ], ], ]; diff --git a/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php b/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php index eae90d2ca7b42ee05a92a5d5aabd1d1fff69b144..dd34274e0715fe83d6642316316dd8227efe847a 100644 --- a/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php +++ b/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php @@ -381,7 +381,7 @@ public function testEntityQueryRelationship() { $this->switchToWorkspace('live'); $node_1 = $this->createNode([ - 'title' => 'live node 1' + 'title' => 'live node 1', ]); $entity_test = EntityTestMulRev::create([ 'name' => 'live entity_test_mulrev', diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 128b84efa666a6ad6839210ea16dd7a88d7f386b..30c8688ef69d80a0e2cf53fa14229da1212280ef 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -21,6 +21,12 @@ + + + + + + diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php index 133e445bd04774214ae3e0291414024d8c570956..ad8b4383bdba98251e14ea66c001a5ea6aeb8a82 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php @@ -138,7 +138,7 @@ public function testFieldWidgetsWithLimitedValidationErrors() { // \Drupal\file\Plugin\Field\FieldWidget\FileWidget::process(). $text_file = current($this->getTestFiles('text')); $edit = [ - 'files[test_file_0]' => \Drupal::service('file_system')->realpath($text_file->uri) + 'files[test_file_0]' => \Drupal::service('file_system')->realpath($text_file->uri), ]; $assert_session->elementNotExists('css', 'input#edit-test-file-0-remove-button'); $this->drupalPostForm(NULL, $edit, 'Upload'); diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php index c8748342fb72d6d3c0372ef50bcf300304f49b9c..cc43936d6f166f27d0b63965da080cd07337983d 100644 --- a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php +++ b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php @@ -83,7 +83,7 @@ public function testCrossSiteRequest() { $response = $httpClient->request('POST', $url->setAbsolute()->toString(), [ 'headers' => [ 'Origin' => $origin, - ] + ], ]); $this->assertEquals(200, $response->getStatusCode()); } diff --git a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php index 3aaac143eac6b46b3070aad2465ad8ad4314b12a..96b59d7be00a45acdbc33c5d6445fc90c1686737 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php @@ -63,8 +63,8 @@ public function testMixedCasePaths() { $this->drupalGet('admin/content', [ 'query' => [ - 'title' => 'FooBarBaz' - ] + 'title' => 'FooBarBaz', + ], ]); $this->assertSession()->linkExists('FooBarBaz'); @@ -74,8 +74,8 @@ public function testMixedCasePaths() { $this->drupalGet('Admin/Content', [ 'query' => [ - 'title' => 'FooBarBaz' - ] + 'title' => 'FooBarBaz', + ], ]); $this->assertSession()->linkExists('FooBarBaz'); diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php index 744f527ba2a4d0b0458559125dc157388882d890..d7d84708fe9f26ef73719b72acf7c3b341f92467 100644 --- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php @@ -265,7 +265,7 @@ protected function initMink() { } $selectors_handler = new SelectorsHandler([ - 'hidden_field_selector' => new HiddenFieldSelector() + 'hidden_field_selector' => new HiddenFieldSelector(), ]); $session = new Session($driver, $selectors_handler); $this->mink = new Mink(); diff --git a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php index c52e3ea8533abab32a63fce7a58a0b001236eeae..4ceebf5b9b32deee12dddeb4a0151998740c6722 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php @@ -21,7 +21,7 @@ class CacheabilityMetadataConfigOverrideTest extends KernelTestBase { 'config', 'config_override_test', 'system', - 'user' + 'user', ]; /** diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php index a9cd9f19022b42aefbb4786d075ede2f5a0bccde..6a0f938bd4558bad8872066fd5e8223a7849b24b 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php @@ -50,9 +50,9 @@ public function testDependencyManagement() { 'id' => 'entity1', 'dependencies' => [ 'enforced' => [ - 'module' => ['node'] - ] - ] + 'module' => ['node'], + ], + ], ] ); $entity1->save(); @@ -200,7 +200,7 @@ public function testConfigEntityUninstall() { 'id' => 'entity1', 'dependencies' => [ 'enforced' => [ - 'module' => ['node', 'config_test'] + 'module' => ['node', 'config_test'], ], ], ] @@ -264,7 +264,7 @@ public function testConfigEntityUninstallComplex(array $entity_id_suffixes) { 'id' => 'entity_' . $entity_id_suffixes[0], 'dependencies' => [ 'enforced' => [ - 'module' => ['node', 'config_test'] + 'module' => ['node', 'config_test'], ], ], ] @@ -309,7 +309,7 @@ public function testConfigEntityUninstallComplex(array $entity_id_suffixes) { 'dependencies' => [ 'enforced' => [ 'config' => [$entity_1->getConfigDependencyName()], - 'module' => ['node', 'config_test'] + 'module' => ['node', 'config_test'], ], ], ] @@ -508,7 +508,7 @@ public function testConfigEntityDelete() { // Test dependencies between configuration entities. $entity1 = $storage->create( [ - 'id' => 'entity1' + 'id' => 'entity1', ] ); $entity1->save(); @@ -621,7 +621,7 @@ public function testContentEntityDelete() { 'id' => 'entity1', 'dependencies' => [ 'enforced' => [ - 'content' => [$content_entity->getConfigDependencyName()] + 'content' => [$content_entity->getConfigDependencyName()], ], ], ] @@ -632,7 +632,7 @@ public function testContentEntityDelete() { 'id' => 'entity2', 'dependencies' => [ 'enforced' => [ - 'config' => [$entity1->getConfigDependencyName()] + 'config' => [$entity1->getConfigDependencyName()], ], ], ] diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php index 4cbc16a0e04281f9f9165e949bac1dc166975b5a..1b468b0670fae09ea869b14ecdbc32ebbd7f6eb1 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php @@ -31,7 +31,7 @@ public function testNormalize() { $config = $this->config('config_test.dynamic.system'); $data = [ 'label' => 'foobar', - 'additional_key' => TRUE + 'additional_key' => TRUE, ] + $config->getRawData(); $config->setData($data)->save(); $this->assertNotIdentical($config_entity->toArray(), $config->getRawData(), 'Stored config entity is not is equivalent to config schema.'); diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php index 807152bfedd6d59daace7cbe5f81e44d41df3b4a..154d2383b4f7c875274fd7b58473f78c1f784e26 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php @@ -97,7 +97,7 @@ public function testStorageMethods() { $entity = $this->storage->create([ 'id' => $this->randomMachineName(), 'label' => $this->randomString(), - 'style' => 999 + 'style' => 999, ]); $entity->save(); $this->assertSame('999', $entity->style); diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php index 01a9746dffe2f708d18fbb34d5c74266687897ab..84b5a2de1314c5596d65e636e803948d820bc624 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php @@ -105,7 +105,7 @@ public function testRenameValidation() { catch (ConfigImporterException $e) { $this->pass('Expected ConfigImporterException thrown when a renamed configuration entity does not match the existing entity type.'); $expected = [ - new FormattableMarkup('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', ['@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id]) + new FormattableMarkup('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', ['@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id]), ]; $this->assertEqual($expected, $this->configImporter->getErrors()); } @@ -134,7 +134,7 @@ public function testRenameSimpleConfigValidation() { // UUIDs match. $this->configImporter->reset(); $expected = [ - 'config_test.old::config_test.new' + 'config_test.old::config_test.new', ]; $renames = $this->configImporter->getUnprocessedConfiguration('rename'); $this->assertSame($expected, $renames); @@ -148,7 +148,7 @@ public function testRenameSimpleConfigValidation() { catch (ConfigImporterException $e) { $this->pass('Expected ConfigImporterException thrown when simple configuration is renamed.'); $expected = [ - new FormattableMarkup('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', ['@old_name' => 'config_test.old', '@new_name' => 'config_test.new']) + new FormattableMarkup('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', ['@old_name' => 'config_test.old', '@new_name' => 'config_test.new']), ]; $this->assertEqual($expected, $this->configImporter->getErrors()); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php index 3aff3d5302af7ac1cad5920711e976708c7e0640..dc4e0ae12b9d64f95abc3764bb8c9b3402232209 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php @@ -226,7 +226,7 @@ public function testSecondaryWritePrimaryFirst() { // Add a dependency on primary, to ensure that is synced first. 'dependencies' => [ 'config' => [$name_primary], - ] + ], ]; $sync->write($name_secondary, $values_secondary); @@ -265,7 +265,7 @@ public function testSecondaryWriteSecondaryFirst() { // Add a dependency on secondary, so that is synced first. 'dependencies' => [ 'config' => [$name_secondary], - ] + ], ]; $sync->write($name_primary, $values_primary); $values_secondary = [ @@ -322,7 +322,7 @@ public function testSecondaryUpdateDeletedDeleterFirst() { // Add a dependency on deleter, to make sure that is synced first. 'dependencies' => [ 'config' => [$name_deleter], - ] + ], ]; $storage->write($name_deletee, $values_deletee); $values_deletee['label'] = 'Updated Deletee'; @@ -338,7 +338,7 @@ public function testSecondaryUpdateDeletedDeleterFirst() { // will also be synced after the deletee due to alphabetical ordering. 'dependencies' => [ 'config' => [$name_deleter], - ] + ], ]; $storage->write($name_other, $values_other); $values_other['label'] = 'Updated other'; diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php index b2859a0bbfc156f0452134be01219ad61e47e9cd..e16225d0ecaae6002f334f475342604e7980ca37 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php @@ -352,7 +352,7 @@ public function testConfigSaveWithSchema() { // If the config schema doesn't have a type it shouldn't be casted. 'no_type' => 1, 'mapping' => [ - 'string' => 1 + 'string' => 1, ], 'float' => '3.14', 'null_float' => '', @@ -375,7 +375,7 @@ public function testConfigSaveWithSchema() { 'boolean' => TRUE, 'no_type' => 1, 'mapping' => [ - 'string' => '1' + 'string' => '1', ], 'float' => 3.14, 'null_float' => NULL, diff --git a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php index c18910e21d4344f0a6098a71e31e280f29206dba..dc121eaf565d0a727c500fcf21d7b49faa4a8844 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php @@ -65,7 +65,7 @@ protected function setUp() { for ($i = 1; $i < 3; $i++) { $entity = EntityTest::create([ - 'name' => $this->randomMachineName() + 'name' => $this->randomMachineName(), ]); $entity->save(); $this->referencedEntities[] = $entity; @@ -297,7 +297,7 @@ public function testInvalidEntityAutocompleteElement() { $form_state = (new FormState()) ->setValues([ 'single_no_validate' => 'single - non-existent label', - 'single_autocreate_no_validate' => 'single - autocreate non-existent label' + 'single_autocreate_no_validate' => 'single - autocreate non-existent label', ]); $form_builder->submitForm($this, $form_state); @@ -309,7 +309,7 @@ public function testInvalidEntityAutocompleteElement() { $form_state = (new FormState()) ->setValues([ 'single_no_validate' => 'single - non-existent label (42)', - 'single_autocreate_no_validate' => 'single - autocreate non-existent label (43)' + 'single_autocreate_no_validate' => 'single - autocreate non-existent label (43)', ]); $form_builder->submitForm($this, $form_state); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php index 8545efe0fa086e4ff8e6ecafed5ff8ef907f40cf..c7bcc2922724acb3afaed4990f840ba8ac0b48aa 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php @@ -351,7 +351,7 @@ public function providerTestFieldAccess() { 'name' => 'A test entity', 'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe', ], - FALSE + FALSE, ], 'string ID entity' => [ EntityTestStringId::class, @@ -360,7 +360,7 @@ public function providerTestFieldAccess() { 'name' => 'A test entity', 'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe', ], - TRUE + TRUE, ], ]; } diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php index ff3cee571261d5190a1f9fc56167f40c93317379..4cbffedbf8c0765abf716169f39294be28d794d3 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php @@ -1067,7 +1067,7 @@ public function testInitialValueFromField($default_initial_value, $expected_valu // field, allowing us to test the 'default_value' parameter of // \Drupal\Core\Field\BaseFieldDefinition::setInitialValueFromField(). $storage->create([ - 'name' => 'Second entity' + 'name' => 'Second entity', ])->save(); // Add a base field with an initial value inherited from another field. diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php index 4974a74cb7535a205a23a4064123505b13ab1c64..afd7e0d9b79c8f7fb973aa14bb5d541ca0df47ee 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php @@ -35,12 +35,12 @@ public function testLoadEntityByUuidAccessChecking() { // Create two test entities. $entity_0 = EntityTest::create([ 'type' => 'entity_test', - 'name' => 'published entity' + 'name' => 'published entity', ]); $entity_0->save(); $entity_1 = EntityTest::create([ 'type' => 'entity_test', - 'name' => 'unpublished entity' + 'name' => 'unpublished entity', ]); $entity_1->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php index f048569707dbbdb501a870b55063210d14a5053f..3f30b2b8996d3382f7a941637794bf4bd3ed8823 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php @@ -683,7 +683,7 @@ public function testCaseSensitivity() { 'translatable' => FALSE, 'settings' => [ 'case_sensitive' => FALSE, - ] + ], ]); $field_storage->save(); @@ -729,7 +729,7 @@ public function testCaseSensitivity() { 'name' => $this->randomMachineName(), 'langcode' => 'en', 'field_ci' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase'], - 'field_cs' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase'] + 'field_cs' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase'], ])->save(); // Check the case insensitive field, = operator. @@ -920,7 +920,7 @@ public function testPendingRevisions() { $entity->isDefaultRevision(FALSE); $entity->{$this->figures}->setValue([ 'color' => 'red', - 'shape' => 'square' + 'shape' => 'square', ]); $entity->save(); @@ -949,7 +949,7 @@ public function testPendingRevisions() { $entity->isDefaultRevision(FALSE); $entity->{$this->figures}->setValue([ 'color' => 'red', - 'shape' => 'square' + 'shape' => 'square', ]); $entity->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php index cedf6851a8b5c826aa7562a23b50b3ffa9720f9a..469f4a32a553f876654a3edd54c7758f1a5af9b0 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php @@ -212,7 +212,7 @@ public function testReferencedEntitiesStringId() { // Create the default target entity. $target_entity = EntityTestStringId::create([ 'id' => $this->randomString(), - 'type' => $this->bundle + 'type' => $this->bundle, ]); $target_entity->save(); @@ -381,7 +381,7 @@ public function testTargetEntityNoLoad() { $definitions = [ 'target_reference' => BaseFieldDefinition::create('entity_reference') ->setSetting('target_type', $entity_type->id()) - ->setSetting('handler', 'default') + ->setSetting('handler', 'default'), ]; $this->state->set('entity_test_update.additional_base_field_definitions', $definitions); $this->entityManager->clearCachedDefinitions(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php index 9c003493f436285482b22a705f62f480091a0a7b..0ef35db9dfb1b4c6d029d5b73432287b157c25f1 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php @@ -88,7 +88,7 @@ protected function setUp() { $this->fieldStorage->save(); $this->field = FieldConfig::create([ 'field_storage' => $this->fieldStorage, - 'bundle' => $entity_type + 'bundle' => $entity_type, ]); $this->field->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php index 81e1976fef5fc46922b5cef0c528ef95b73e4268..d3d5e5b1d41376452e57838f8e1fffdfcb053761 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php @@ -144,7 +144,7 @@ public function testValidationWithCompositeConstraint() { */ public function testEntityLevelConstraintValidation() { $entity = EntityTestCompositeConstraint::create([ - 'name' => 'entity-level-violation' + 'name' => 'entity-level-violation', ]); $entity->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php index df9f4b13376f7c25235bed2e1dfe75643b1f8fcc..d68a1f5ac8cef7c4b84f6e36cb15109c4f7e9b72 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php @@ -34,7 +34,7 @@ protected function setUp() { /** @var \Drupal\user\RoleInterface $role */ $role = Role::create([ - 'id' => RoleInterface::ANONYMOUS_ID + 'id' => RoleInterface::ANONYMOUS_ID, ]); $role ->grantPermission('administer entity_test content') diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php index 3f182c91e80b18f3ba321072111d992d5c7fbdc1..be609d8d712e21fe0c1e76930a4913b1361e108e 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php @@ -150,7 +150,7 @@ public function testPreExistingItemsValidation() { ['entity' => $unpublished_node], ['entity' => $different_bundle_node], ['entity' => $deleted_node], - ] + ], ]); // Check that users with access are able pass the validation for fields diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php index 590a96cd5f8e8d85c081b19b4b5a4124821a796c..9229a60b0b5c8f3a43e8a31af8647e55714511fe 100644 --- a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php @@ -82,7 +82,7 @@ public function testConfigurableFieldStorageSettings() { $field_storage = FieldStorageConfig::create([ 'field_name' => 'test_field', 'entity_type' => 'entity_test', - 'type' => 'test_field' + 'type' => 'test_field', ]); // Check that the default settings have been populated. @@ -109,11 +109,11 @@ public function testConfigurableFieldSettings() { $field_storage = FieldStorageConfig::create([ 'field_name' => 'test_field', 'entity_type' => 'entity_test', - 'type' => 'test_field' + 'type' => 'test_field', ]); $field = FieldConfig::create([ 'field_storage' => $field_storage, - 'bundle' => 'entity_test' + 'bundle' => 'entity_test', ]); // Note: FieldConfig does not populate default settings until the config // is saved. diff --git a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php index 05ac7c2557f1b2f0dde8b3dcc59c3fcd33ec5770..4eca9976f222c18000b13efda225afa5da6347cb 100644 --- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php @@ -62,7 +62,7 @@ public function testFileMimeTypeDetection() { 'extensions' => [ 'jar' => 0, 'jpg' => 1, - ] + ], ]; $test_case = [ diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php index 57e0342075f55133c5f841e6f985fb9437f526a3..5c31dc66a42a278f4b3963e588705bc5ea91760d 100644 --- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php +++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php @@ -119,7 +119,7 @@ public function testManipulations() { 'gif' => IMAGETYPE_GIF, 'jpeg' => IMAGETYPE_JPEG, 'jpg' => IMAGETYPE_JPEG, - 'jpe' => IMAGETYPE_JPEG + 'jpe' => IMAGETYPE_JPEG, ]; $image = $this->imageFactory->get(); foreach ($expected_image_types as $extension => $expected_image_type) { @@ -266,7 +266,7 @@ public function testManipulations() { array_fill(0, 3, 76) + [3 => 0], array_fill(0, 3, 149) + [3 => 0], array_fill(0, 3, 29) + [3 => 0], - array_fill(0, 3, 225) + [3 => 127] + array_fill(0, 3, 225) + [3 => 127], ], ], ]; diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php index 5966eaa745fd2bbfd722fc18eaa0e1c3ab553aff..6bf2faaa984b9b57db5cd25620ea1dd1159b1e90 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php @@ -266,7 +266,7 @@ public function testThemeTableRowRenderArray() { [ '1-one', [ - 'data' => '1-two' + 'data' => '1-two', ], '1-three', ], diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php index 2acaefb873b62b80272d495704b5297c99234b36..043aae4445ce4ede9ff408091ff27b8ade13370d 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php @@ -36,7 +36,7 @@ public function testDrupalRenderThemePreprocessAttached() { 'library' => [ 'test/generic_preprocess', 'test/specific_preprocess', - ] + ], ]; $this->assertEqual($expected_attached, $test_element['#attached'], 'All expected assets from theme preprocess hooks attached.'); diff --git a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php index ef593751bf2cbc28aa97fa370146260008b1ca07..40a8a743dd38b77eb0a5211f5a8900caa6459c46 100644 --- a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php +++ b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php @@ -111,7 +111,7 @@ public function testDrupalRewriteSettings() { 'required' => TRUE, ], ], - 'expected' => '$no_index = true;' + 'expected' => '$no_index = true;', ]; // Make an empty file. $filename = Settings::get('file_public_path', $site_path . '/files') . '/mock_settings.php'; diff --git a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php index 748e2bbc6fa076199a194fff8013a49177a09761..d190cc53439db1b7703d20e9f0e58a29433107e5 100644 --- a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php +++ b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php @@ -19,7 +19,7 @@ class TranslationStringTest extends KernelTestBase { * @var array */ public static $modules = [ - 'language' + 'language', ]; /** diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php index 7f6d2eccda8ededad48d4ebf6ce53ee612359874..169da31925d836fa397a7aa1da8f01c6345df8a6 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php @@ -205,7 +205,7 @@ public function testThemeTemplatesRegisteredByModules() { $expected = [ 'template_preprocess', 'template_preprocess_container', - 'template_preprocess_theme_test_registered_by_module' + 'template_preprocess_theme_test_registered_by_module', ]; $registry = $registry_theme->get(); $this->assertEquals($expected, array_values($registry['theme_test_registered_by_module']['preprocess functions'])); diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php index c44cc1c814166631e0a841c4f65f9ad156cf87f6..8bcc3c4bc98c1fd660671b132a70a78872a2900d 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php @@ -73,7 +73,7 @@ public function providerTestThemeRenderAndAutoescape() { 'type markup with EM tags is rendered' => [['#markup' => 'hi'], 'hi'], 'SCRIPT tag in string is escaped' => [ '', - Html::escape('') + Html::escape(''), ], 'type plain_text render array EM tag is escaped' => [['#plain_text' => 'hi'], Html::escape('hi')], 'type hidden render array is rendered' => [['#type' => 'hidden', '#name' => 'foo', '#value' => 'bar'], "\n"], diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php index dbdf351a718321e11c245b91951d312a6e6460cc..826ac047cb5baf306cf82d13c7330561ab2adcaa 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php @@ -30,7 +30,7 @@ class TwigMarkupInterfaceTest extends KernelTestBase { * @var array */ public static $modules = [ - 'language' + 'language', ]; /** diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php index bbdf10992f3097adae9ce9a50b2ef04ba25d1f67..54f2872ab8b716dd195e8ec9ca588ed035d9c5f6 100644 --- a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php @@ -37,7 +37,7 @@ public function testValidation() { ->setPropertyDefinition('key', DataDefinition::create('integer')) ->addConstraint('ComplexData', [ 'key' => [ - 'AllowedValues' => [1, 2, 3] + 'AllowedValues' => [1, 2, 3], ], ]); @@ -67,7 +67,7 @@ public function testValidation() { ->setPropertyDefinition('key', DataDefinition::create('integer')) ->addConstraint('ComplexData', [ 'key' => [ - 'NotNull' => [] + 'NotNull' => [], ], ]); diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php index e3e3fae2fe8c276a65040fcccf02fb6c552b1284..581960ed509300659b3bd893d774621822f42970 100644 --- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php +++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php @@ -470,7 +470,7 @@ public function testTypedDataMaps() { $this->assertEqual($value, [ 'one' => 'uno', 'two' => 'zwei', - 'three' => 'drei' + 'three' => 'drei', ]); $properties = $typed_data->getProperties(); diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index 313b2036d9ffd277a8675d957731ecc39e6ce3a7..433ec38f411d9b000f8ab1a1e40931a60f790f14 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -313,7 +313,7 @@ protected function initMink() { } $selectors_handler = new SelectorsHandler([ - 'hidden_field_selector' => new HiddenFieldSelector() + 'hidden_field_selector' => new HiddenFieldSelector(), ]); $session = new Session($driver, $selectors_handler); $this->mink = new Mink(); diff --git a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php index 717e32749a9e0f463fdc095266564b48c2b939f4..b37a2bfde4f6be6554614a50b6a0d9713c17c5bc 100644 --- a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php +++ b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php @@ -159,7 +159,7 @@ public function testAllCallable() { [__CLASS__, 'callMeStatic'], function () { return TRUE; - } + }, ])); $this->assertFalse(Inspector::assertAllCallable([ @@ -169,7 +169,7 @@ function () { function () { return TRUE; }, - "I'm not callable" + "I'm not callable", ])); } diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php index 1b5b23f347e44661eaaf5f3b32e4a6fdf3e6cdb1..577bb8baffd100cea71da45e27c69c476f75000f 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php @@ -993,7 +993,7 @@ protected function getMockContainerDefinition() { 'arguments' => [], 'configurator' => [ $this->getServiceCall('configurator'), - 'configureService' + 'configureService', ], ]; $services['configurable_service_exception'] = [ diff --git a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php index 4760c1955b2972342161596ac20eb45dc0b5a0ef..0d1ef58c195243eee3678fadb5458809d06ad5c6 100644 --- a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php +++ b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php @@ -91,7 +91,7 @@ public function providerTestRegexDirectoryIterator() { [ '1.yml', '2.yml', - '3.txt' + '3.txt', ], ], [ diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php index 2f8f23e5b3c863fff54c1bb60ba58e053636cea1..82226d0d3425d2266f701c879284eb88b86d87e5 100644 --- a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php +++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php @@ -37,7 +37,7 @@ public function providerEncodeDecodeTests() { [10], [0 => '123456'], ], - [NULL] + [NULL], ]; } diff --git a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php index 10664ffc66df81122dcc1d8cc0a08b0b16f235f3..02a4ed5f15b14d86f203afef9eb3979f87b60f8e 100644 --- a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php @@ -61,7 +61,7 @@ public function providerTestHexToRgb() { // Add invalid data types (hex value must be a string). foreach ([ 1, 12, 1234, 12345, 123456, 1234567, 12345678, 123456789, 123456789, - -1, PHP_INT_MAX, PHP_INT_MAX + 1, -PHP_INT_MAX, 0x0, 0x010 + -1, PHP_INT_MAX, PHP_INT_MAX + 1, -PHP_INT_MAX, 0x0, 0x010, ] as $value) { $invalid[] = [$value, '', TRUE]; } diff --git a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php index 80fc7ddf33ca4c3f3df4e8754c69efae573667a3..4cdb1b62f007ecd8e8c100ab250d50a427c836d4 100644 --- a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php @@ -265,7 +265,7 @@ public function testFilter($array, $callable, $expected) { public function providerTestFilter() { $data = []; $data['1d-array'] = [ - [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE] + [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE], ]; $data['1d-array-callable'] = [ [0, 1, '', TRUE], diff --git a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php index 7503cc27100cb24bff913a40c6aebc8aa256116a..ab2447065a76b4554e7074311b89f2ef759651a2 100644 --- a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php @@ -49,42 +49,42 @@ public function providerSortByWeightElement() { $tests[] = [ ['weight' => 1], ['weight' => 1], - 0 + 0, ]; // Weights set and $a is less (lighter) than $b. $tests[] = [ ['weight' => 1], ['weight' => 2], - -1 + -1, ]; // Weights set and $a is greater (heavier) than $b. $tests[] = [ ['weight' => 2], ['weight' => 1], - 1 + 1, ]; // Weights not set. $tests[] = [ [], [], - 0 + 0, ]; // Weights for $b not set. $tests[] = [ ['weight' => 1], [], - 1 + 1, ]; // Weights for $a not set. $tests[] = [ [], ['weight' => 1], - -1 + -1, ]; return $tests; @@ -125,42 +125,42 @@ public function providerSortByWeightProperty() { $tests[] = [ ['#weight' => 1], ['#weight' => 1], - 0 + 0, ]; // Weights set and $a is less (lighter) than $b. $tests[] = [ ['#weight' => 1], ['#weight' => 2], - -1 + -1, ]; // Weights set and $a is greater (heavier) than $b. $tests[] = [ ['#weight' => 2], ['#weight' => 1], - 1 + 1, ]; // Weights not set. $tests[] = [ [], [], - 0 + 0, ]; // Weights for $b not set. $tests[] = [ ['#weight' => 1], [], - 1 + 1, ]; // Weights for $a not set. $tests[] = [ [], ['#weight' => 1], - -1 + -1, ]; return $tests; @@ -201,35 +201,35 @@ public function providerSortByTitleElement() { $tests[] = [ ['title' => 'test'], ['title' => 'test'], - 0 + 0, ]; // Title $a not set. $tests[] = [ [], ['title' => 'test'], - -4 + -4, ]; // Title $b not set. $tests[] = [ ['title' => 'test'], [], - 4 + 4, ]; // Titles set but not equal. $tests[] = [ ['title' => 'test'], ['title' => 'testing'], - -1 + -1, ]; // Titles set but not equal. $tests[] = [ ['title' => 'testing'], ['title' => 'test'], - 1 + 1, ]; return $tests; @@ -270,35 +270,35 @@ public function providerSortByTitleProperty() { $tests[] = [ ['#title' => 'test'], ['#title' => 'test'], - 0 + 0, ]; // Title $a not set. $tests[] = [ [], ['#title' => 'test'], - -4 + -4, ]; // Title $b not set. $tests[] = [ ['#title' => 'test'], [], - 4 + 4, ]; // Titles set but not equal. $tests[] = [ ['#title' => 'test'], ['#title' => 'testing'], - -1 + -1, ]; // Titles set but not equal. $tests[] = [ ['#title' => 'testing'], ['#title' => 'test'], - 1 + 1, ]; return $tests; diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php index 0664f94272cc1aae459446b28413c3d1970fcb07..695b4278ed3fb78e067a285e057f439473898a34 100644 --- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php @@ -503,31 +503,31 @@ public function providerTestAttributes() { 'Example: alt', 'Example: alt', 'Image tag with alt and title attribute', - ['img'] + ['img'], ], [ 'Drupal', 'Drupal', 'Link tag with rel attribute', - ['a'] + ['a'], ], [ 'Drupal 8: The best release ever.', 'Drupal 8: The best release ever.', 'Span tag with property attribute', - ['span'] + ['span'], ], [ '', '', 'Image tag with data attribute', - ['img'] + ['img'], ], [ '', '', 'Link tag with numeric data attribute', - ['a'] + ['a'], ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php index 7be87f593f3188447ec81b73753bca5b79bcb460..65038a6dc8aef41aec14e8789ba15c205843bedc 100644 --- a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php +++ b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php @@ -55,7 +55,7 @@ public function providerTestGet() { [ 'value' => 'Foo', ], - 'Foo' + 'Foo', ]; $random = $this->randomMachineName(); $random_html_entity = '&' . $random; diff --git a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php index 95cacea45c6d7e3b521625151c8813da9d2fa0d9..99ba0a5ef9c4d1e60677a82c8e0a9102909f1bc4 100644 --- a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php @@ -141,12 +141,12 @@ public function providerAttachedAssets() { 'same libraries, different timestamps' => [ (new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currentTime' => $time]), (new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currentTime' => $time + 100]), - 1 + 1, ], 'different libraries, same timestamps' => [ (new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currenttime' => $time]), (new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal', 'core/jquery'])->setSettings(['currentTime' => $time]), - 2 + 2, ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php index ba0b4db532f3492cd86b61bb09bf600634a40569..18c7b0080eb6509d425fe4d6bddc5b5ba2eaa249 100644 --- a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php @@ -94,7 +94,7 @@ public function providerTestRender() { '#tag' => 'style', '#value' => $value, '#attributes' => [ - 'media' => $media + 'media' => $media, ], '#browsers' => $browsers, ]; @@ -461,7 +461,7 @@ public function testRenderInvalidType() { 'media' => 'all', 'preprocess' => TRUE, 'browsers' => [], - 'data' => 'http://example.com/popular.js' + 'data' => 'http://example.com/popular.js', ]; $this->renderer->render($css_group); } diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php index f3824e8d5009b4d8ce40a3fb44e6ed277d244da0..8b0b7598165d98572b7e27b93071fd57909ac63f 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php @@ -128,7 +128,7 @@ public function providerSetCacheMaxAge() { [new \stdClass(), TRUE], [300, FALSE], [[], TRUE], - [8.0, TRUE] + [8.0, TRUE], ]; } diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php index 76f33eb96ed3e5b32368da02b555933b46b5a66f..c792d1abad5cc3cff904a8f873a60e5d124f4efc 100644 --- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php +++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php @@ -72,7 +72,7 @@ public function tearDown() { // Delete test site directory. $this->fileUnmanagedDeleteRecursive($test_site_directory, [ BrowserTestBase::class, - 'filePreDeleteCallback' + 'filePreDeleteCallback', ]); } } @@ -113,7 +113,7 @@ public function testQuickStartCommand() { define('DRUPAL_TEST_IN_CHILD_SITE', FALSE); chmod($this->testDb->getTestSitePath(), 0755); $cookieJar = CookieJar::fromArray([ - 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()) + 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()), ], '127.0.0.1'); $response = $guzzle->get('http://127.0.0.1:' . $port, ['cookies' => $cookieJar]); @@ -165,7 +165,7 @@ public function testQuickStartInstallAndServerCommands() { define('DRUPAL_TEST_IN_CHILD_SITE', FALSE); chmod($this->testDb->getTestSitePath(), 0755); $cookieJar = CookieJar::fromArray([ - 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()) + 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()), ], '127.0.0.1'); $response = $guzzle->get('http://127.0.0.1:' . $port, ['cookies' => $cookieJar]); diff --git a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php index 00a5eb2ea62ac245eda9119b36bb66031d3ff2c8..b2ddd5e3652314224e319c4ca7bf5740d07b360c 100644 --- a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php +++ b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php @@ -38,7 +38,7 @@ public function providerTestAttributeData() { 'alt' => 'Alternate', ], ' id="id-test" class="first last" alt="Alternate"', - 'Multiple attributes.' + 'Multiple attributes.', ], // Verify empty attributes array is rendered. [[], '', 'Empty attributes array.'], diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php index 0d417ab494040439366c67e99ef2e5ce53257673..81d424b2ce14c8d0bd6fc2c941b61a8eccd8c0d5 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php @@ -283,13 +283,13 @@ public function providerCalculateDependenciesWithPluginCollections() { 'config_dependencies' => [ 'config' => [$instance_dependency_1], 'module' => [$instance_dependency_2], - ] + ], ], [ 'config' => [$instance_dependency_1], - 'module' => [$instance_dependency_2, 'test'] - ] - ] + 'module' => [$instance_dependency_2, 'test'], + ], + ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php index 7bcbc97cc998ac63667dda87d961a11459e04b6a..f689db48ab260e354b60bddf5e50f528252ccf1b 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php @@ -29,7 +29,7 @@ public function testWithDependencies() { 'dependencies' => [ 'module' => [ 'node', - 'views' + 'views', ], 'config' => [ 'config_test.dynamic.entity_id:745b0ce0-aece-42dd-a800-ade5b8455e84', diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php index 914d4f6fe53307b735eff76065aeb1c9bf298a7e..c5d4c1c4ea5ace744ce30e048d34f60825ff508b 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php @@ -85,7 +85,7 @@ public function testConstructBadStorage() { $this->setExpectedException(ConfigEntityStorageClassException::class, '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage is not \Drupal\Core\Config\Entity\ConfigEntityStorage or it does not extend it'); new ConfigEntityType([ 'id' => 'example_config_entity_type', - 'handlers' => ['storage' => '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage'] + 'handlers' => ['storage' => '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage'], ]); } diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php index f3c882cec05a0a4ba7d6d5ba06e09f324834d9c3..5558b26e8367dac1ba359e845c84893caa668f40 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php @@ -37,42 +37,42 @@ public function providerTestGetKeys() { $tests[] = [ ['uuid:abc'], 'uuid', - $this->getConfigObject('test')->set('uuid', 'abc') + $this->getConfigObject('test')->set('uuid', 'abc'), ]; // Tests a lookup being set to a top level key when sub-keys exist. $tests[] = [ [], 'uuid', - $this->getConfigObject('test')->set('uuid.blah', 'abc') + $this->getConfigObject('test')->set('uuid.blah', 'abc'), ]; // Tests a non existent key. $tests[] = [ [], 'uuid', - $this->getConfigObject('test') + $this->getConfigObject('test'), ]; // Tests a non existent sub key. $tests[] = [ [], 'uuid.blah', - $this->getConfigObject('test')->set('uuid', 'abc') + $this->getConfigObject('test')->set('uuid', 'abc'), ]; // Tests a existent sub key. $tests[] = [ ['uuid.blah:abc'], 'uuid.blah', - $this->getConfigObject('test')->set('uuid.blah', 'abc') + $this->getConfigObject('test')->set('uuid.blah', 'abc'), ]; // One wildcard. $tests[] = [ ['test.*.value:a', 'test.*.value:b'], 'test.*.value', - $this->getConfigObject('test')->set('test.a.value', 'a')->set('test.b.value', 'b') + $this->getConfigObject('test')->set('test.a.value', 'a')->set('test.b.value', 'b'), ]; // Three wildcards. @@ -82,14 +82,14 @@ public function providerTestGetKeys() { $this->getConfigObject('test') ->set('test.a.sub2.a.sub4.a.value', 'aaa') ->set('test.a.sub2.a.sub4.b.value', 'aab') - ->set('test.b.sub2.a.sub4.b.value', 'bab') + ->set('test.b.sub2.a.sub4.b.value', 'bab'), ]; // Three wildcards in a row. $tests[] = [ ['test.*.*.*.value:abc', 'test.*.*.*.value:abd'], 'test.*.*.*.value', - $this->getConfigObject('test')->set('test.a.b.c.value', 'abc')->set('test.a.b.d.value', 'abd') + $this->getConfigObject('test')->set('test.a.b.c.value', 'abc')->set('test.a.b.d.value', 'abd'), ]; return $tests; diff --git a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php index fc0d63bede3d2407a946381bff07a4510750970f..353e6d3c7b0797ed7781e05be519dcbcaad9ef27 100644 --- a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php +++ b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php @@ -63,7 +63,7 @@ protected function getConfigData() { 'uuid' => $uuid->generate(), 'dependencies' => [ 'config' => [ - 'field.storage.node.body' + 'field.storage.node.body', ], ], ], @@ -89,7 +89,7 @@ protected function getConfigData() { ], // Simple config. 'system.performance' => [ - 'stale_file_threshold' => 2592000 + 'stale_file_threshold' => 2592000, ], ]; diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php index 227027b3933bdb79db7ce35aad81e1dbe6fd0669..8d0fccdd6bb0be031a7485d7145caed24b7302b3 100644 --- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php @@ -161,7 +161,7 @@ public function providerTestGetController() { // Tests passing a controller via the request. [['_controller' => 'Drupal\Tests\Core\Controller\MockContainerAware::getResult'], 'Drupal\Tests\Core\Controller\MockContainerAware', 'This is container aware.'], // Tests a request with no controller specified. - [[], FALSE] + [[], FALSE], ]; } diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php index 455cbcf799a836f6a56d550151f754eb10a72827..fde641bd400e122fbd4b361777f77e3a83562e82 100644 --- a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php @@ -51,7 +51,7 @@ public function providerTestWeekDaysOrdered() { 5 => 'Friday', 6 => 'Saturday', 0 => 'Sunday', - ] + ], ]; $data[] = [ 2, diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php index 30a515c78b7665b4997e96332f0bd4baf0ca9e14..76ab32e331de3fb4e7dd6e2f251a6349b23b04a8 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php @@ -347,7 +347,7 @@ public function testProcessNoPriorityAndExtraArguments() { $container ->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments') ->addTag('service_collector', [ - 'call' => 'addNoPriority' + 'call' => 'addNoPriority', ]); $container @@ -376,7 +376,7 @@ public function testProcessWithIdAndExtraArguments() { $container ->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments') ->addTag('service_collector', [ - 'call' => 'addWithId' + 'call' => 'addWithId', ]); $container @@ -408,7 +408,7 @@ public function testProcessWithDifferentArgumentsOrderAndDefaultValue() { $container ->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments') ->addTag('service_collector', [ - 'call' => 'addWithDifferentOrder' + 'call' => 'addWithDifferentOrder', ]); $container @@ -416,7 +416,7 @@ public function testProcessWithDifferentArgumentsOrderAndDefaultValue() { ->addTag('consumer_id', [ 'priority' => 0, 'extra1' => 'extra1', - 'extra3' => 'extra3' + 'extra3' => 'extra3', ]); $handler_pass = new TaggedHandlersPass(); diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php index 4d198b9cb20b9bcfc33bd7a729283274ed1626b5..308c49c0faa36771cdda4947645704d833625a95 100644 --- a/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php @@ -21,7 +21,7 @@ class DiscoverServiceProvidersTest extends UnitTestCase { public function testDiscoverServiceCustom() { new Settings([ 'container_yamls' => [ - __DIR__ . '/fixtures/custom.yml' + __DIR__ . '/fixtures/custom.yml', ], ]); diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php index da041bda4e493596f23f8ed41042b090c4fb57f7..bc32d04ba6810678ea1655428fb13a4fcb48ba6f 100644 --- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php @@ -116,7 +116,7 @@ public function providerTestTrustedHosts() { 'www.example.com', 'www.example.com', 'canonical URL is trusted', - TRUE + TRUE, ]; // Tests missing hostname for HTTP/1.0 compatibility where the Host @@ -128,25 +128,25 @@ public function providerTestTrustedHosts() { 'example.com', 'www.example.com', 'host from settings is trusted', - TRUE + TRUE, ]; $data[] = [ 'subdomain.example.com', 'www.example.com', 'host from settings is trusted', - TRUE + TRUE, ]; $data[] = [ 'www.example.org', 'www.example.com', 'host from settings is trusted', - TRUE + TRUE, ]; $data[] = [ 'example.org', 'www.example.com', 'host from settings is trusted', - TRUE + TRUE, ]; // Tests mismatch. @@ -154,7 +154,7 @@ public function providerTestTrustedHosts() { 'www.blackhat.com', 'www.example.com', 'unspecified host is untrusted', - FALSE + FALSE, ]; return $data; diff --git a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php index 81069c35d3fd3056131578dff4d276b1d7b8cb52..eeba7e54c5d1c825ad10788fcd36097120ce5fa8 100644 --- a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php @@ -40,7 +40,7 @@ protected function setUp() { $this->fieldTypeDefinition = [ 'id' => $this->fieldType, 'storage_settings' => [ - 'some_setting' => 'value 1' + 'some_setting' => 'value 1', ], 'field_settings' => [ 'some_instance_setting' => 'value 2', diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php index a7f7eb41aa7e2f7e6cb3865735f9576d4e190ee9..87b8a68fc1ccaf454afbce4913eea9f604865022 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php @@ -676,7 +676,7 @@ public function testGetFieldMap() { 'type' => 'string', 'bundles' => ['second_bundle' => 'second_bundle'], ], - ] + ], ]; $this->assertEquals($expected, $this->entityFieldManager->getFieldMap()); } @@ -695,7 +695,7 @@ public function testGetFieldMapFromCache() { 'type' => 'string', 'bundles' => ['second_bundle' => 'second_bundle'], ], - ] + ], ]; $this->setUpEntityTypeDefinitions(); $this->cacheBackend->get('entity_field_map')->willReturn((object) ['data' => $expected]); diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php index 5643b15ca3e6465308b1fa4f53cbc2c56c483176..a18e41076d10fbea3855cd926456c46a8232e212 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @@ -155,7 +155,7 @@ public function testGetSchemaBase() { ], 'domain' => [ 'type' => 'varchar', - ] + ], ], 'unique keys' => [ 'email' => ['username', 'hostname', ['domain', 3]], @@ -194,7 +194,7 @@ public function testGetSchemaBase() { ], 'city' => [ 'type' => 'varchar', - ] + ], ], 'indexes' => [ 'country_state_city' => ['country', 'state', ['city', 10]], @@ -397,7 +397,7 @@ public function testGetSchemaRevisionable() { 'id' => 'id', 'revision' => 'revision_id', ], - ] + ], ]) ->setMethods(['getRevisionMetadataKeys']) ->getMock(); @@ -429,7 +429,7 @@ public function testGetSchemaRevisionable() { 'revision_id' => [ 'type' => 'int', 'not null' => FALSE, - ] + ], ], 'primary key' => ['id'], 'unique keys' => [ @@ -440,7 +440,7 @@ public function testGetSchemaRevisionable() { 'entity_test__revision' => [ 'table' => 'entity_test_revision', 'columns' => ['revision_id' => 'revision_id'], - ] + ], ], ], 'entity_test_revision' => [ @@ -533,7 +533,7 @@ public function testGetSchemaTranslatable() { 'langcode' => [ 'type' => 'varchar', 'not null' => TRUE, - ] + ], ], 'primary key' => ['id'], 'unique keys' => [], @@ -613,7 +613,7 @@ public function testGetSchemaRevisionableTranslatable() { 'revision' => 'revision_id', 'langcode' => 'langcode', ], - ] + ], ]) ->setMethods(['getRevisionMetadataKeys']) ->getMock(); @@ -670,7 +670,7 @@ public function testGetSchemaRevisionableTranslatable() { 'langcode' => [ 'type' => 'varchar', 'not null' => TRUE, - ] + ], ], 'primary key' => ['id'], 'unique keys' => [ @@ -853,7 +853,7 @@ public function testDedicatedTableSchema() { 'color' => [ 'table' => 'color', 'columns' => [ - 'color' => 'id' + 'color' => 'id', ], ], ], @@ -1020,7 +1020,7 @@ public function testDedicatedTableSchemaForEntityWithStringIdentifier() { 'color' => [ 'table' => 'color', 'columns' => [ - 'color' => 'id' + 'color' => 'id', ], ], ], diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php index 964020cf5ca8a53c50d652c134eaf3e6b7ead4b4..3d7fb43aef190901f757b73d4aecfe0a741a2363 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php @@ -790,7 +790,7 @@ public function testGetTableMappingRevisionableTranslatable(array $entity_keys) $revision_metadata_keys = [ 'revision_created' => 'revision_timestamp', 'revision_user' => 'revision_uid', - 'revision_log_message' => 'revision_log' + 'revision_log_message' => 'revision_log', ]; $this->entityType->expects($this->atLeastOnce()) @@ -1389,7 +1389,7 @@ protected function setUpModuleHandlerNoImplementations() { ->method('getImplementations') ->will($this->returnValueMap([ ['entity_load', []], - [$this->entityTypeId . '_load', []] + [$this->entityTypeId . '_load', []], ])); $this->container->set('module_handler', $this->moduleHandler); diff --git a/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php b/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php index bfd5143849a82c87985913df5638582da7f38ee5..d2672b344bea4b7b7e2657ddd27ddfa8f0f3e631 100644 --- a/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php +++ b/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php @@ -83,7 +83,7 @@ public function providerTestSetConfiguration() { 'bar' => 'bar value', 'baz' => 'baz value', ], - ] + ], ], ], [ @@ -96,7 +96,7 @@ public function providerTestSetConfiguration() { 'handler_settings' => [ // Same setting from root level takes precedence. 'setting2' => 'this will be overwritten', - ] + ], ], ], ]; diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php index 8f339a839dcdfa283050249f7fc05c69c2536053..2fadea64268b5388897adea33086941af33fb267 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php @@ -43,11 +43,11 @@ public function providerTestOn4xx() { return [ 'uncacheable exception' => [ new MethodNotAllowedHttpException(['POST', 'PUT'], 'test message'), - JsonResponse::class + JsonResponse::class, ], 'cacheable exception' => [ new CacheableMethodNotAllowedHttpException((new CacheableMetadata())->setCacheContexts(['route']), ['POST', 'PUT'], 'test message'), - CacheableJsonResponse::class + CacheableJsonResponse::class, ], ]; } diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php index 49b9fbd28998bdf2e130fae14396f389c9220576..d8290fe4753ae48965fbf4d9dcda242276a082af 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php @@ -116,7 +116,7 @@ public function testOnResponse($content, $expected_content) { Request::create('/'), 'foo', new Response($content, 200, [ - 'Content-Type' => 'application/rss+xml' + 'Content-Type' => 'application/rss+xml', ]) ); diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php index 3b9d09a12a8a48bf850762b1da5bbee13cc49958..993bf759ffba5e0aa56e480e45275d0388812829 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php @@ -111,7 +111,7 @@ public function testGetAllAvailableInfo() { 'core' => '8.x', 'name' => 'test name', 'mtime' => 123456789, - ] + ], ], $infos); } @@ -129,7 +129,7 @@ public function testGetAllInstalledInfo() { 'core' => '8.x', 'name' => 'test name', 'mtime' => 123456789, - ] + ], ], $infos); } diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php index 4fda0022b7d59a652a76ebb9de0295d3024c39ec..820c6bd47cccd7dd0a7846578a80063131be2feb 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php @@ -52,7 +52,7 @@ protected function getModuleHandler() { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] + ], ], $this->cacheBackend); return $module_handler; } @@ -107,8 +107,8 @@ public function testModuleReloading() { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] - ], $this->cacheBackend + ], + ], $this->cacheBackend, ]) ->setMethods(['load']) ->getMock(); @@ -177,7 +177,7 @@ public function testSetModuleList() { $fixture_module_handler = $this->getModuleHandler(); $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend + $this->root, [], $this->cacheBackend, ]) ->setMethods(['resetImplementations']) ->getMock(); @@ -205,7 +205,7 @@ public function testAddModule() { $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend + $this->root, [], $this->cacheBackend, ]) ->setMethods(['resetImplementations']) ->getMock(); @@ -227,7 +227,7 @@ public function testAddProfile() { $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend + $this->root, [], $this->cacheBackend, ]) ->setMethods(['resetImplementations']) ->getMock(); @@ -264,8 +264,8 @@ public function testLoadAllIncludes() { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] - ], $this->cacheBackend + ], + ], $this->cacheBackend, ]) ->setMethods(['loadInclude']) ->getMock(); @@ -353,8 +353,8 @@ public function testCachedGetImplementations() { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] - ], $this->cacheBackend + ], + ], $this->cacheBackend, ]) ->setMethods(['buildImplementationInfo', 'loadInclude']) ->getMock(); @@ -391,8 +391,8 @@ public function testCachedGetImplementationsMissingMethod() { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] - ], $this->cacheBackend + ], + ], $this->cacheBackend, ]) ->setMethods(['buildImplementationInfo']) ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php index 645daf43d24540b87b0c7718340c8527f4aeee89..f0f9f3bec071f64d50b055fd4e3e1a4491ca4297 100644 --- a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php +++ b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php @@ -119,7 +119,7 @@ public function providerTestBasename() { $data[] = [ 'public://dir/test.txt', 'test', - '.txt' + '.txt', ]; return $data; } diff --git a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php index 14e03cb565cb93aff0e384351fd5c1f02f89212f..4d95e0b0bcca51054226da9f7579bbd2bb0317db 100644 --- a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php @@ -19,7 +19,7 @@ public function testConfig() { // Set up some configuration in a mocked config factory. $trait->configFactory = $this->getConfigFactoryStub([ 'editable.config' => [], - 'immutable.config' => [] + 'immutable.config' => [], ]); $trait->expects($this->any()) diff --git a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php index 177504c13ad64f3c32c4e0beca16bd1727629f4a..d9537c3fdbdb5b6f8eb43532a4b898eafcd8caa3 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php @@ -86,7 +86,7 @@ public function testBuildResponseRenderArray() { '#ajax' => [ 'callback' => function (array $form, FormStateInterface $form_state) { return $form['test']; - } + }, ], ]; $request = new Request(); @@ -117,7 +117,7 @@ public function testBuildResponseResponse() { '#ajax' => [ 'callback' => function (array $form, FormStateInterface $form_state) { return new AjaxResponse([]); - } + }, ], ]; $request = new Request(); @@ -142,7 +142,7 @@ public function testBuildResponseWithCommands() { '#ajax' => [ 'callback' => function (array $form, FormStateInterface $form_state) { return new AjaxResponse([]); - } + }, ], ]; $request = new Request(); @@ -175,7 +175,7 @@ public function testBuildResponseWithUpdateCommand() { '#ajax' => [ 'callback' => function (array $form, FormStateInterface $form_state) { return new AjaxResponse([]); - } + }, ], ]; $request = new Request(); diff --git a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php index f089bc37678cda35d669a12480a09adcca901e16..473308f64b346d3d544883f2e1f87d635380c9e7 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php @@ -331,7 +331,7 @@ public function testLoadCachedFormStateWithFiles() { public function testSetCacheWithForm() { $form_build_id = 'the_form_build_id'; $form = [ - '#form_id' => 'the_form_id' + '#form_id' => 'the_form_id', ]; $form_state = new FormState(); diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php index ae42e511a27aa17166a6b616c00b2a442e6d6710..7335603686eaf2ead1dc14e0b3680a55e4d25220 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php @@ -1254,7 +1254,7 @@ public function testGetResponse() { public function testSetRedirect() { $route_name = 'foo'; $route_parameters = [ - 'bar' => 'baz' + 'bar' => 'baz', ]; $options = [ 'qux' => 'foo', diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php index cc5514a76be4cc2ab5b2ad6b62540c67445f95d7..ea431bf3aa843b3dc0dd99ff8fad8aac4cf5a057 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php @@ -85,7 +85,7 @@ protected function setupLocalTaskDefault() { */ public function testGetRouteParametersForStaticRoute() { $this->pluginDefinition = [ - 'route_name' => 'test_route' + 'route_name' => 'test_route', ]; $this->routeProvider->expects($this->once()) @@ -105,7 +105,7 @@ public function testGetRouteParametersForStaticRoute() { public function testGetRouteParametersInPluginDefinitions() { $this->pluginDefinition = [ 'route_name' => 'test_route', - 'route_parameters' => ['parameter' => 'example'] + 'route_parameters' => ['parameter' => 'example'], ]; $this->routeProvider->expects($this->once()) @@ -124,7 +124,7 @@ public function testGetRouteParametersInPluginDefinitions() { */ public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters() { $this->pluginDefinition = [ - 'route_name' => 'test_route' + 'route_name' => 'test_route', ]; $route = new Route('/test-route/{parameter}'); @@ -147,7 +147,7 @@ public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters() */ public function testGetRouteParametersForDynamicRouteWithUpcastedParameters() { $this->pluginDefinition = [ - 'route_name' => 'test_route' + 'route_name' => 'test_route', ]; $route = new Route('/test-route/{parameter}'); @@ -177,17 +177,17 @@ public function providerTestGetWeight() { [ 'base_route' => 'local_task_default', 'route_name' => 'local_task_default', - 'id' => 'local_task_default' + 'id' => 'local_task_default', ], 'local_task_default', - -10 + -10, ], // If the base route is different from the route of the tab, ignore it. [ [ 'base_route' => 'local_task_example', 'route_name' => 'local_task_other', - 'id' => 'local_task_default' + 'id' => 'local_task_default', ], 'local_task_default', 0, @@ -291,9 +291,9 @@ public function testGetOptions() { 'attributes' => [ 'class' => [ 'example', - 'is-active' - ] - ] + 'is-active', + ], + ], ], $this->localTaskBase->getOptions($route_match)); } diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php index 0295e408c7a01deece65788d498cf95c8150da07..0bb828b2ff1e6f34d8fda8e8d622031d2d42a16c 100644 --- a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php @@ -46,7 +46,7 @@ public function testExtractFormValues() { 'weight' => 5, 'expanded' => 1, 'parent' => 'bar', - 'menu_name' => 'foo' + 'menu_name' => 'foo', ], $result); } diff --git a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php index 98a122ca214b8369ad52f1118e20f6d504e54f4f..b287f12eb3aa3052ff10ee9e0f2df77f9461dc28 100644 --- a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php @@ -111,14 +111,14 @@ public function testSaveOverride() { $definition_save_1 = [ 'definitions' => [ - 'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE] - ] + 'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE], + ], ]; $definitions_save_2 = [ 'definitions' => [ 'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE], - 'test1__la___ma' => ['parent' => 'test1', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE] - ] + 'test1__la___ma' => ['parent' => 'test1', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE], + ], ]; $config->expects($this->at(2)) ->method('set') diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php index 6d60e1d4e77244314890d30d38d5ae3f2c159d29..b7549ce47ace46a093da60db3585b582fcbfcbfd 100644 --- a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php +++ b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php @@ -80,7 +80,7 @@ public function providerTestAddConverter() { $converters[0]['sorted'] = [ 'strawberry', 'raspberry', 'pear', 'peach', - 'pineapple', 'banana', 'apple' + 'pineapple', 'banana', 'apple', ]; $converters[1]['unsorted'] = [ @@ -95,7 +95,7 @@ public function providerTestAddConverter() { $converters[1]['sorted'] = [ 'giraffe', 'zebra', 'eagle', 'ape', - 'cat', 'puppy', 'llama' + 'cat', 'puppy', 'llama', ]; return $converters; diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php index e6215caac834e310a794ea5bc605447c60244aaf..0aa2de7b64bc2842a719655e9ba26f5fb9225444 100644 --- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php +++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php @@ -49,8 +49,8 @@ protected function setUp() { $language_prefixes = array_keys($this->languages); $config = [ 'url' => [ - 'prefixes' => array_combine($language_prefixes, $language_prefixes) - ] + 'prefixes' => array_combine($language_prefixes, $language_prefixes), + ], ]; // Create a URL-based language negotiation method definition. @@ -109,7 +109,7 @@ public function testProcessInbound() { $config_factory_stub = $this->getConfigFactoryStub( [ 'system.site' => [ - 'page.front' => '/user/login' + 'page.front' => '/user/login', ], 'language.negotiation' => [ 'url' => [ diff --git a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php index 040b1f988e1a126ef6aeec919b2cc257cd157ef8..092525c75d555a057d731f33641dcf9120220789 100644 --- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php +++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php @@ -675,17 +675,17 @@ public function providerTestAddCacheableDependency() { 'merge-cacheable-metadata' => [ (new BubbleableMetadata())->setCacheContexts(['foo'])->setCacheTags(['foo'])->setCacheMaxAge(20), (new CacheableMetadata())->setCacheContexts(['bar'])->setCacheTags(['bar'])->setCacheMaxAge(60), - (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20) + (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20), ], 'merge-bubbleable-metadata' => [ (new BubbleableMetadata())->setCacheContexts(['foo'])->setCacheTags(['foo'])->setCacheMaxAge(20)->setAttachments(['foo' => []]), (new BubbleableMetadata())->setCacheContexts(['bar'])->setCacheTags(['bar'])->setCacheMaxAge(60)->setAttachments(['bar' => []]), - (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20)->setAttachments(['foo' => [], 'bar' => []]) + (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20)->setAttachments(['foo' => [], 'bar' => []]), ], 'merge-attachments-metadata' => [ (new BubbleableMetadata())->setAttachments(['foo' => []]), (new BubbleableMetadata())->setAttachments(['baro' => []]), - (new BubbleableMetadata())->setAttachments(['foo' => [], 'bar' => []]) + (new BubbleableMetadata())->setAttachments(['foo' => [], 'bar' => []]), ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php index db463d8b40e7867381b13a59540ade6eb44e1141..06f11d3b9468fe30fcd7f1c0b3a51454d91a2726 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php @@ -59,7 +59,7 @@ public function testProcessMachineName() { 'maxlength' => 32, 'additional_property' => TRUE, '#additional_property_with_hash' => TRUE, - ] + ], ]; $complete_form = [ @@ -67,7 +67,7 @@ public function testProcessMachineName() { '#type' => 'textfield', '#id' => 'source', ], - 'test_machine_name' => $element + 'test_machine_name' => $element, ]; $form_state->setCompleteForm($complete_form); diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php index ead47e471e969d3362d7d3e3201d60d3ba6a33e4..f095ae57368e37399951cdec6b442e0985eaa0d3 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php @@ -30,7 +30,7 @@ public function testProcessTableselectWithLinkTitle() { $element['#value'] = 0; $element['#options'][] = [ - 'title' => new Link('my-text', Url::fromRoute('')) + 'title' => new Link('my-text', Url::fromRoute('')), ]; $element['#attributes'] = []; diff --git a/core/tests/Drupal/Tests/Core/Render/ElementTest.php b/core/tests/Drupal/Tests/Core/Render/ElementTest.php index d168f741e5c7f4ab1151c6433e103fd11c279085..818244832485734441c39c3f8960ab8042df6e23 100644 --- a/core/tests/Drupal/Tests/Core/Render/ElementTest.php +++ b/core/tests/Drupal/Tests/Core/Render/ElementTest.php @@ -28,7 +28,7 @@ public function testProperties() { $element = [ '#property1' => 'property1', '#property2' => 'property2', - 'property3' => 'property3' + 'property3' => 'property3', ]; $properties = Element::properties($element); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php index f55e34832e088ec1e922b3f2289ae7843404b6cc..6ad2acbe0da35dff68fb8ad1de5e91c7dd6f4815 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php @@ -297,7 +297,7 @@ public function providerTestContextBubblingEdgeCases() { $test_element = [ '#cache' => [ 'keys' => ['parent'], - 'tags' => ['yar', 'har'] + 'tags' => ['yar', 'har'], ], '#markup' => 'parent', 'child' => [ @@ -308,10 +308,10 @@ public function providerTestContextBubblingEdgeCases() { 'tags' => ['fiddle', 'dee'], ], '#attached' => [ - 'library' => ['foo/bar'] + 'library' => ['foo/bar'], ], '#markup' => '', - ] + ], ], ]; $expected_cache_items = [ diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php index 8cfa0fda7c8a9ee7c92260d4942c51b9efa95c7d..0d38afd10612bf014ecabe896e988026a105ee83 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php @@ -1125,7 +1125,7 @@ protected function setupThemeManagerForDetails() { EOS; $output = str_replace([ '{{ title }}', - '{{ children }}' + '{{ children }}', ], [$vars['#title'], $vars['#children']], $output); return $output; }); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php index 76f9d48b27960c68da9c30108a9ce435ae3dba45..7e4b83345eb9a83283acdcfc368019d3fbc22ed7 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php @@ -46,10 +46,10 @@ public function testRenderRecursionWithNestedRenderRoot() { $page = [ 'content' => [ '#pre_render' => [ - $callable + $callable, ], '#suffix' => $parent_markup, - ] + ], ]; $renderer->renderRoot($page); } @@ -78,10 +78,10 @@ public function testRenderRecursionWithNestedRender() { 'content' => [ 'complex_child' => $complex_child_template, '#post_render' => [ - $callable + $callable, ], '#suffix' => $parent_markup, - ] + ], ]; $output = $renderer->renderRoot($page); @@ -114,10 +114,10 @@ public function testRenderRecursionWithNestedRenderPlain() { $page = [ 'content' => [ '#pre_render' => [ - $callable + $callable, ], '#suffix' => $parent_markup, - ] + ], ]; $output = $renderer->renderRoot($page); $this->assertEquals('

                This is a rendered placeholder!

                ' . $parent_markup, $output, 'Rendered output as expected, with the placeholder replaced.'); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php index eda1f9fc6057035f6894771106c667e1745a1351..adfc890cb08a21e0e229c3c55c81fd99a5179730 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php @@ -180,7 +180,7 @@ public function providerTestRenderBasic() { '#pre_render' => [function ($elements) { $elements['#markup'] .= ''; return $elements; - } + }, ], ], 'fooalert("bar");', @@ -193,7 +193,7 @@ public function providerTestRenderBasic() { '#pre_render' => [function ($elements) { $elements['#markup'] .= ''; return $elements; - } + }, ], ], 'foo', @@ -206,7 +206,7 @@ public function providerTestRenderBasic() { '#pre_render' => [function ($elements) { $elements['#plain_text'] .= ''; return $elements; - } + }, ], ], 'foo<script>alert("bar");</script>', @@ -508,7 +508,7 @@ public function testRenderWithAccessCallbackCallable($access) { $build = [ '#access_callback' => function () use ($access) { return $access; - } + }, ]; $this->assertAccess($build, $access); @@ -527,7 +527,7 @@ public function testRenderWithAccessPropertyAndCallback($access) { '#access' => $access, '#access_callback' => function () { return TRUE; - } + }, ]; $this->assertAccess($build, $access); @@ -613,7 +613,7 @@ public function providerRenderTwice() { [ '#markup' => 'kittens', '#cache' => [ - 'tags' => ['kittens-147'] + 'tags' => ['kittens-147'], ], ], ], @@ -961,7 +961,7 @@ public function providerTestAddCacheableDependency() { 'contexts' => ['theme'], 'tags' => ['bar'], 'max-age' => 600, - ] + ], ], new TestCacheableDependency(['user.roles'], ['foo'], Cache::PERMANENT), [ @@ -979,7 +979,7 @@ public function providerTestAddCacheableDependency() { 'contexts' => ['theme'], 'tags' => ['bar'], 'max-age' => 600, - ] + ], ], new \stdClass(), [ diff --git a/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php b/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php index 38278ab0811040d1aad37cea6bff88037ed3279c..5ff38fa46b6ba897da8b4f3251cea04e912c8149 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php +++ b/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php @@ -60,7 +60,7 @@ public function staticSampleRouteCollection() { 'path' => '/path/two', 'methods' => ['GET'], 'requirements' => [ - '_format' => 'json' + '_format' => 'json', ], ]; $routes['route_d'] = [ @@ -70,7 +70,7 @@ public function staticSampleRouteCollection() { 'path' => '/path/two', 'methods' => ['GET', 'HEAD'], 'requirements' => [ - '_format' => 'html' + '_format' => 'html', ], ]; diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php index a872e305d4177ed9f2a02e3e64cc68383924b946..f98a8a9c545b8e2c2ec0a16db0e29fa55bd74f54 100644 --- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php +++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php @@ -114,12 +114,12 @@ public function providerTestEscaping() { ['{{ path(name = "foo", parameters = foo) }}', TRUE], [ '{{ path(name = "foo", parameters = { foo: ["foo", "bar"] }) }}', - TRUE + TRUE, ], ['{{ path(name = "foo", parameters = { foo: foo }) }}', TRUE], [ '{{ path(name = "foo", parameters = { foo: "foo", bar: "bar" }) }}', - TRUE + TRUE, ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php index 7084278b804bf86d26425de1cb8f3a618c39d30d..8a6fdc83193caab670f157140cda485526a006ab 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php @@ -38,7 +38,7 @@ public function testConstructor($db_prefix, $expected_db_prefix, $expected_site_ public function providerTestConstructor() { return [ ['test1234', 'test1234', 'sites/simpletest/1234'], - ['test123456test234567', 'test123456test234567', 'sites/simpletest/234567'] + ['test123456test234567', 'test123456test234567', 'sites/simpletest/234567'], ]; } diff --git a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php index ede32ebf30eacb8848b70293971f53149e64bfe4..853a788f5feec316008868f78995556938b0c98d 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php @@ -40,8 +40,8 @@ protected function getFilesystem() { 'Listener.php' => ' [ 'Listener.php' => 'addConstraint('Callback', [ 'callback' => function ($value, ExecutionContextInterface $context) { $context->addViolation('test violation: ' . $value); - } + }, ]) ); $typed_data->setValue('foo'); @@ -147,7 +147,7 @@ public function testBasicValidateWithMultipleConstraints() { $options = [ 'callback' => function ($value, ExecutionContextInterface $context) { $context->addViolation('test violation'); - } + }, ]; $typed_data = $this->typedDataManager->create( DataDefinition::create('string') @@ -320,7 +320,7 @@ protected function buildExampleTypedDataWithProperties($subkey_value = NULL) { 'value' => [ 'key1' => 'value1', 'key2' => 'value2', - 'key_with_properties' => $subkey_value + 'key_with_properties' => $subkey_value, ], ]; $tree['properties'] = [ diff --git a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php index 2462148ebe0875d6ab158a901cf7d2c3eff33883..4ebecb6097ac822ffb5ed91f00ee53908aea2f96 100644 --- a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php +++ b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php @@ -79,14 +79,14 @@ function module_b_post_update_a() { 'modules' => [ 'module_a' => [ 'module_a.post_update.php' => $module_a, - 'module_a.info.yml' => $info_a + 'module_a.info.yml' => $info_a, ], 'module_b' => [ 'module_b.post_update.php' => $module_b, - 'module_b.info.yml' => $info_b + 'module_b.info.yml' => $info_b, ], - ] - ] + ], + ], ], ]); } @@ -103,13 +103,13 @@ public function testGetPendingUpdateFunctionsNoExistingUpdates() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $this->assertEquals([ 'module_a_post_update_a', 'module_a_post_update_b', - 'module_b_post_update_a' + 'module_b_post_update_a', ], $update_registry->getPendingUpdateFunctions()); } @@ -150,12 +150,12 @@ public function testGetPendingUpdateFunctionsExistingUpdates() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $this->assertEquals(array_values([ 'module_a_post_update_b', - 'module_b_post_update_a' + 'module_b_post_update_a', ]), array_values($update_registry->getPendingUpdateFunctions())); } @@ -172,7 +172,7 @@ public function testGetPendingUpdateInformation() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $expected = []; @@ -197,7 +197,7 @@ public function testGetPendingUpdateInformationWithExistingUpdates() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $expected = []; @@ -218,7 +218,7 @@ public function testGetModuleUpdateFunctions() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $this->assertEquals(['module_a_post_update_a', 'module_a_post_update_b'], array_values($update_registry->getModuleUpdateFunctions('module_a'))); @@ -241,7 +241,7 @@ public function testRegisterInvokedUpdatesWithoutExistingUpdates() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $update_registry->registerInvokedUpdates(['module_a_post_update_a']); } @@ -262,7 +262,7 @@ public function testRegisterInvokedUpdatesWithMultiple() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $update_registry->registerInvokedUpdates(['module_a_post_update_a', 'module_a_post_update_b']); } @@ -283,7 +283,7 @@ public function testRegisterInvokedUpdatesWithExistingUpdates() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $update_registry->registerInvokedUpdates(['module_a_post_update_a']); } @@ -304,7 +304,7 @@ public function testFilterOutInvokedUpdatesByModule() { $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $update_registry->filterOutInvokedUpdatesByModule('module_a'); diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php index 91620e61559874d240a96cb61d96184d5a006ad2..5f8474a0dc95cae225e2659ab7ea7a47a809e30b 100644 --- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php @@ -94,7 +94,7 @@ protected function setUp() { $container = new ContainerBuilder(); $this->cacheContextManager = new CacheContextsManager($container, [ 'current_user', - 'custom_context' + 'custom_context', ]); $container->set('cache_contexts_manager', $this->cacheContextManager); \Drupal::setContainer($container); @@ -170,7 +170,7 @@ public function testReplaceWithBubbleableMetadataObject() { $this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags()); $this->assertEquals([ 'current_user', - 'custom_context' + 'custom_context', ], $bubbleable_metadata->getCacheContexts()); $this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge()); } @@ -205,7 +205,7 @@ public function testReplaceWithHookTokensWithBubbleableMetadata() { $this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags()); $this->assertEquals([ 'current_user', - 'custom_context' + 'custom_context', ], $bubbleable_metadata->getCacheContexts()); $this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge()); } @@ -243,7 +243,7 @@ public function testReplaceWithHookTokensAlterWithBubbleableMetadata() { $this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags()); $this->assertEquals([ 'current_user', - 'custom_context' + 'custom_context', ], $bubbleable_metadata->getCacheContexts()); $this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge()); }