Issue #2572613 by Malevi4, idebr, pfrenssen, Mile23, RajeevK: Fix 'Drupal.Array.Array.CommaLastItem' coding standard
parent
b8f93d5b61
commit
be6d515cad
|
@ -715,7 +715,7 @@ function drupal_attach_tabledrag(&$element, array $options) {
|
|||
'subgroup' => NULL,
|
||||
'source' => NULL,
|
||||
'hidden' => TRUE,
|
||||
'limit' => 0
|
||||
'limit' => 0,
|
||||
];
|
||||
|
||||
$group = $options['group'];
|
||||
|
|
|
@ -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 <a href=":handbook_url">webhosting issues</a> 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 <a href=":handbook_url">webhosting issues</a> 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',
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ class Html {
|
|||
// 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;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class Broken extends BlockBase {
|
|||
*/
|
||||
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;
|
||||
|
|
|
@ -59,7 +59,7 @@ class PreExistingConfigException extends ConfigException {
|
|||
$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);
|
||||
|
|
|
@ -92,7 +92,7 @@ class UnmetDependenciesException extends ConfigException {
|
|||
$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);
|
||||
|
|
|
@ -57,7 +57,7 @@ class DiffFormatter extends DiffFormatterBase {
|
|||
[
|
||||
'data' => $ybeg + $this->line_stats['offset']['y'],
|
||||
'colspan' => 2,
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ class DiffFormatter extends DiffFormatterBase {
|
|||
[
|
||||
'data' => ['#markup' => $line],
|
||||
'class' => 'diff-context diff-addedline',
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ class DiffFormatter extends DiffFormatterBase {
|
|||
[
|
||||
'data' => ['#markup' => $line],
|
||||
'class' => 'diff-context diff-deletedline',
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ class DiffFormatter extends DiffFormatterBase {
|
|||
[
|
||||
'data' => ['#markup' => $line],
|
||||
'class' => 'diff-context',
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class ContentEntityDeleteForm extends ContentEntityConfirmFormBase {
|
|||
$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,
|
||||
];
|
||||
|
|
|
@ -133,7 +133,7 @@ class ContentEntityForm extends EntityForm implements ContentEntityFormInterface
|
|||
'#type' => 'container',
|
||||
'#weight' => 99,
|
||||
'#attributes' => [
|
||||
'class' => ['entity-content-form-footer']
|
||||
'class' => ['entity-content-form-footer'],
|
||||
],
|
||||
'#optional' => TRUE,
|
||||
];
|
||||
|
|
|
@ -144,7 +144,7 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn
|
|||
'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 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn
|
|||
}
|
||||
|
||||
return [
|
||||
'widgets' => new EntityDisplayPluginCollection($this->pluginManager, $configurations)
|
||||
'widgets' => new EntityDisplayPluginCollection($this->pluginManager, $configurations),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn
|
|||
'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 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn
|
|||
}
|
||||
|
||||
return [
|
||||
'formatters' => new EntityDisplayPluginCollection($this->pluginManager, $configurations)
|
||||
'formatters' => new EntityDisplayPluginCollection($this->pluginManager, $configurations),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl
|
|||
// 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 {
|
||||
|
|
|
@ -97,7 +97,7 @@ class EntityDeriver implements ContainerDeriverInterface {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ class DefaultHtmlRouteProvider implements EntityRouteProviderInterface, EntityHa
|
|||
$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', [
|
||||
|
|
|
@ -1168,7 +1168,7 @@ class SqlContentEntityStorageSchema implements DynamicallyFieldableEntityStorage
|
|||
$entity_type_id . '__revision' => [
|
||||
'table' => $this->storage->getRevisionTable(),
|
||||
'columns' => [$revision_key => $revision_key],
|
||||
]
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -2043,7 +2043,7 @@ class SqlContentEntityStorageSchema implements DynamicallyFieldableEntityStorage
|
|||
'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,
|
||||
|
|
|
@ -214,19 +214,19 @@ class ConfigImportSubscriber extends ConfigImportValidateEventSubscriberBase {
|
|||
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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -933,7 +933,7 @@ function hook_requirements($phase) {
|
|||
$requirements['drupal'] = [
|
||||
'title' => t('Drupal'),
|
||||
'value' => \Drupal::VERSION,
|
||||
'severity' => REQUIREMENT_INFO
|
||||
'severity' => REQUIREMENT_INFO,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ class LanguageFormatter extends StringFormatter {
|
|||
// 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() : '',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class DecimalItem extends NumericItemBase {
|
|||
'type' => 'numeric',
|
||||
'precision' => $field_definition->getSetting('precision'),
|
||||
'scale' => $field_definition->getSetting('scale'),
|
||||
]
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ class DecimalItem extends NumericItemBase {
|
|||
'value' => [
|
||||
'Regex' => [
|
||||
'pattern' => '/^[+-]?((\d+(\.\d*)?)|(\.\d+))$/i',
|
||||
]
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class EmailItem extends FieldItemBase {
|
|||
'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]),
|
||||
]
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
|
|
|
@ -679,8 +679,8 @@ class EntityReferenceItem extends FieldItemBase implements OptionsProviderInterf
|
|||
'field_storage_config' => [
|
||||
'settings' => [
|
||||
'target_type' => $entity_type->id(),
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ abstract class NumericItemBase extends FieldItemBase {
|
|||
'Range' => [
|
||||
'min' => $min,
|
||||
'minMessage' => t('%name: the value may be no less than %min.', ['%name' => $label, '%min' => $min]),
|
||||
]
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ abstract class NumericItemBase extends FieldItemBase {
|
|||
'Range' => [
|
||||
'max' => $max,
|
||||
'maxMessage' => t('%name: the value may be no greater than %max.', ['%name' => $label, '%max' => $max]),
|
||||
]
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class EntityReferenceAutocompleteWidget extends WidgetBase {
|
|||
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(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ abstract class PluginSettingsBase extends PluginBase implements PluginSettingsIn
|
|||
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 [];
|
||||
|
|
|
@ -778,9 +778,9 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS
|
|||
'#attached' => [
|
||||
'placeholders' => [
|
||||
$placeholder => [
|
||||
'#lazy_builder' => ['form_builder:renderFormTokenPlaceholder', [$placeholder]]
|
||||
]
|
||||
]
|
||||
'#lazy_builder' => ['form_builder:renderFormTokenPlaceholder', [$placeholder]],
|
||||
],
|
||||
],
|
||||
],
|
||||
'#cache' => [
|
||||
'max-age' => 0,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class ClientFactory {
|
|||
'http' => NULL,
|
||||
'https' => NULL,
|
||||
'no' => [],
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
$config = NestedArray::mergeDeep($default_config, Settings::get('http_client_config', []), $config);
|
||||
|
|
|
@ -124,7 +124,7 @@ class SiteSettingsForm extends FormBase {
|
|||
$form['settings'][$key]['#states'] = [
|
||||
'visible' => [
|
||||
':input[name=driver]' => ['value' => $key],
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class DatabaseStorageExpirable extends DatabaseStorage implements KeyValueStoreE
|
|||
'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);
|
||||
}
|
||||
|
|
|
@ -251,20 +251,20 @@ class DatabaseLockBackend extends LockBackendAbstract {
|
|||
'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' => [
|
||||
|
|
|
@ -65,7 +65,7 @@ class SystemCompactLink extends Link {
|
|||
$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 {
|
||||
|
|
|
@ -226,7 +226,7 @@ class HtmlRenderer implements MainContentRendererInterface {
|
|||
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,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ class RenderCache implements RenderCacheInterface {
|
|||
'#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.
|
||||
|
|
|
@ -326,7 +326,7 @@ class Renderer implements RendererInterface {
|
|||
// 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)) {
|
||||
|
|
|
@ -73,7 +73,7 @@ class PrimitiveTypeConstraintValidator extends ConstraintValidator {
|
|||
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),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ class ActionAdminManageForm extends FormBase {
|
|||
'#empty_option' => $this->t('- Select -'),
|
||||
];
|
||||
$form['parent']['actions'] = [
|
||||
'#type' => 'actions'
|
||||
'#type' => 'actions',
|
||||
];
|
||||
$form['parent']['actions']['submit'] = [
|
||||
'#type' => 'submit',
|
||||
|
|
|
@ -40,7 +40,7 @@ class MigrateActionsTest extends MigrateDrupal6TestBase {
|
|||
$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"]);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class MigrateActionsTest extends MigrateDrupal7TestBase {
|
|||
$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"]);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class EmailActionTest extends KernelTestBase {
|
|||
$configuration = [
|
||||
'recipient' => 'test@example.com',
|
||||
'subject' => 'Test subject',
|
||||
'message' => 'Test message'
|
||||
'message' => 'Test message',
|
||||
];
|
||||
$plugin_manager
|
||||
->createInstance('action_send_email_action', $configuration)
|
||||
|
|
|
@ -100,7 +100,7 @@ class DefaultFetcher implements FetcherInterface, ContainerFactoryPluginInterfac
|
|||
'allow_redirects' => [
|
||||
'on_redirect' => function (RequestInterface $request, ResponseInterface $response, UriInterface $uri) use (&$actual_uri) {
|
||||
$actual_uri = (string) $uri;
|
||||
}
|
||||
},
|
||||
],
|
||||
])->send($request);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class BlockedIpsTest extends MigrateSqlSourceTestBase {
|
|||
[
|
||||
'iid' => 1,
|
||||
'ip' => '127.0.0.1',
|
||||
]
|
||||
],
|
||||
];
|
||||
$tests[0]['expected_data'] = [
|
||||
[
|
||||
|
|
|
@ -39,7 +39,7 @@ class BigPipeRegressionTestController {
|
|||
public static function currentTime() {
|
||||
return [
|
||||
'#markup' => '<time datetime="' . date('Y-m-d', time()) . '"></time>',
|
||||
'#cache' => ['max-age' => 0]
|
||||
'#cache' => ['max-age' => 0],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class BigPipePlaceholderTestCases {
|
|||
[
|
||||
'#lazy_builder' => [
|
||||
'Drupal\Core\Render\Element\StatusMessages::renderMessages',
|
||||
[NULL]
|
||||
[NULL],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
@ -129,7 +129,7 @@ class BigPipePlaceholderTestCases {
|
|||
[
|
||||
'#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 @@ class BigPipePlaceholderTestCases {
|
|||
'#attached' => [
|
||||
'placeholders' => [
|
||||
'<hello' => ['#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::helloOrYarhar', []]],
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'<hello',
|
||||
[
|
||||
'#lazy_builder' => [
|
||||
'hello_or_yarhar',
|
||||
[]
|
||||
[],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
@ -188,9 +188,9 @@ class BigPipePlaceholderTestCases {
|
|||
'#pre_render' => [
|
||||
'\Drupal\big_pipe_test\BigPipeTestController::currentTime',
|
||||
],
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'<time>CURRENT TIME</time>',
|
||||
[
|
||||
|
|
|
@ -91,7 +91,7 @@ class BigPipeTestController {
|
|||
public static function currentTime() {
|
||||
return [
|
||||
'#markup' => '<time datetime="' . date('Y-m-d', 668948400) . '"></time>',
|
||||
'#cache' => ['max-age' => 0]
|
||||
'#cache' => ['max-age' => 0],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -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'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ function block_post_update_disable_blocks_with_missing_contexts() {
|
|||
foreach ($blocks as $disabled_block_id => $disabled_block) {
|
||||
$message .= '<li>' . 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'])))),
|
||||
]) . '</li>';
|
||||
}
|
||||
$message .= '</ul>';
|
||||
|
|
|
@ -222,7 +222,7 @@ class BlockListBuilder extends ConfigEntityListBuilder implements FormInterface
|
|||
'#theme_wrappers' => [
|
||||
'container' => [
|
||||
'#attributes' => ['class' => 'region-title__action'],
|
||||
]
|
||||
],
|
||||
],
|
||||
'#prefix' => $title,
|
||||
'#type' => 'link',
|
||||
|
|
|
@ -25,7 +25,7 @@ class FavoriteAnimalTestForm extends FormBase {
|
|||
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'] = [
|
||||
|
|
|
@ -25,7 +25,7 @@ class TestForm extends FormBase {
|
|||
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'] = [
|
||||
|
|
|
@ -164,7 +164,7 @@ class BlockLanguageTest extends BrowserTestBase {
|
|||
|
||||
// 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'));
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ class BlockTest extends BlockTestBase {
|
|||
$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 @@ class BlockTest extends BlockTestBase {
|
|||
|
||||
$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(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class BlockTest extends MigrateSqlSourceTestBase {
|
|||
'schema_version' => '6055',
|
||||
'weight' => '0',
|
||||
'info' => 'a:0:{}',
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
// The expected results.
|
||||
|
@ -104,7 +104,7 @@ class BlockTest extends MigrateSqlSourceTestBase {
|
|||
'pages' => '',
|
||||
'title' => 'Test Title 01',
|
||||
'cache' => -1,
|
||||
'roles' => [2]
|
||||
'roles' => [2],
|
||||
],
|
||||
[
|
||||
'bid' => 2,
|
||||
|
@ -118,7 +118,7 @@ class BlockTest extends MigrateSqlSourceTestBase {
|
|||
'pages' => '<front>',
|
||||
'title' => 'Test Title 02',
|
||||
'cache' => -1,
|
||||
'roles' => [2]
|
||||
'roles' => [2],
|
||||
],
|
||||
];
|
||||
return $tests;
|
||||
|
|
|
@ -118,21 +118,21 @@ class BlockRepositoryTest extends UnitTestCase {
|
|||
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 @@ class BlockRepositoryTest extends UnitTestCase {
|
|||
'top' => ['block1'],
|
||||
'center' => [],
|
||||
'bottom' => ['block5', 'block3', 'block4'],
|
||||
]
|
||||
],
|
||||
];
|
||||
return $test_cases;
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ class BlockContentController extends ControllerBase {
|
|||
*/
|
||||
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
|
||||
|
|
|
@ -190,9 +190,9 @@ class BlockContentBlock extends BlockBase implements ContainerFactoryPluginInter
|
|||
return [
|
||||
'#markup' => $this->t('Block with uuid %uuid does not exist. <a href=":url">Add custom block</a>.', [
|
||||
'%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'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ class BlockContent extends DeriverBase implements ContainerDeriverInterface {
|
|||
$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);
|
||||
|
|
|
@ -34,7 +34,7 @@ abstract class BlockContentTestBase extends WebTestBase {
|
|||
* @var array
|
||||
*/
|
||||
protected $permissions = [
|
||||
'administer blocks'
|
||||
'administer blocks',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -83,7 +83,7 @@ abstract class BlockContentTestBase extends WebTestBase {
|
|||
$block_content = BlockContent::create([
|
||||
'info' => $title,
|
||||
'type' => $bundle,
|
||||
'langcode' => 'en'
|
||||
'langcode' => 'en',
|
||||
]);
|
||||
if ($block_content && $save === TRUE) {
|
||||
$block_content->save();
|
||||
|
|
|
@ -99,7 +99,7 @@ abstract class BlockContentTestBase extends ViewTestBase {
|
|||
$values += [
|
||||
'id' => $id,
|
||||
'label' => $id,
|
||||
'revision' => FALSE
|
||||
'revision' => FALSE,
|
||||
];
|
||||
$bundle = BlockContentType::create($values);
|
||||
$status = $bundle->save();
|
||||
|
|
|
@ -29,7 +29,7 @@ class BlockContentCacheTagsTest extends EntityCacheTagsTestBase {
|
|||
$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());
|
||||
|
|
|
@ -29,7 +29,7 @@ class BlockContentCreationTest extends BlockContentTestBase {
|
|||
*/
|
||||
protected $permissions = [
|
||||
'administer blocks',
|
||||
'administer block_content display'
|
||||
'administer block_content display',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -55,7 +55,7 @@ class BlockContentCreationTest extends BlockContentTestBase {
|
|||
// 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 @@ class BlockContentCreationTest extends BlockContentTestBase {
|
|||
|
||||
// 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 @@ class BlockContentCreationTest extends BlockContentTestBase {
|
|||
// 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 @@ class BlockContentCreationTest extends BlockContentTestBase {
|
|||
|
||||
// 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);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class BlockContentSaveTest extends BlockContentTestBase {
|
|||
'info' => $info,
|
||||
'body' => ['value' => $this->randomMachineName(32)],
|
||||
'type' => 'basic',
|
||||
'id' => $test_id
|
||||
'id' => $test_id,
|
||||
];
|
||||
$block = BlockContent::create($block_array);
|
||||
$block->enforceIsNew(TRUE);
|
||||
|
|
|
@ -31,7 +31,7 @@ abstract class BlockContentTestBase extends BrowserTestBase {
|
|||
* @var array
|
||||
*/
|
||||
protected $permissions = [
|
||||
'administer blocks'
|
||||
'administer blocks',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,7 @@ abstract class BlockContentTestBase extends BrowserTestBase {
|
|||
$block_content = BlockContent::create([
|
||||
'info' => $title,
|
||||
'type' => $bundle,
|
||||
'langcode' => 'en'
|
||||
'langcode' => 'en',
|
||||
]);
|
||||
if ($block_content && $save === TRUE) {
|
||||
$block_content->save();
|
||||
|
|
|
@ -23,7 +23,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase {
|
|||
'content_translation',
|
||||
'block',
|
||||
'field_ui',
|
||||
'block_content'
|
||||
'block_content',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -59,7 +59,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase {
|
|||
$bundle = BlockContentType::create([
|
||||
'id' => $this->bundle,
|
||||
'label' => $this->bundle,
|
||||
'revision' => FALSE
|
||||
'revision' => FALSE,
|
||||
]);
|
||||
$bundle->save();
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase {
|
|||
'translate any entity',
|
||||
'access administration pages',
|
||||
'administer blocks',
|
||||
'administer block_content fields'
|
||||
'administer block_content fields',
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase {
|
|||
$block_content = BlockContent::create([
|
||||
'info' => $title,
|
||||
'type' => $bundle,
|
||||
'langcode' => 'en'
|
||||
'langcode' => 'en',
|
||||
]);
|
||||
$block_content->save();
|
||||
return $block_content;
|
||||
|
@ -161,7 +161,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase {
|
|||
$bundle = BlockContentType::create([
|
||||
'id' => $disabled_bundle,
|
||||
'label' => $disabled_bundle,
|
||||
'revision' => FALSE
|
||||
'revision' => FALSE,
|
||||
]);
|
||||
$bundle->save();
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class BlockContentTypeTest extends BlockContentTestBase {
|
|||
*/
|
||||
protected $permissions = [
|
||||
'administer blocks',
|
||||
'administer block_content fields'
|
||||
'administer block_content fields',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -94,7 +94,7 @@ abstract class BlockContentTestBase extends ViewTestBase {
|
|||
$values += [
|
||||
'id' => $id,
|
||||
'label' => $id,
|
||||
'revision' => FALSE
|
||||
'revision' => FALSE,
|
||||
];
|
||||
$bundle = BlockContentType::create($values);
|
||||
$status = $bundle->save();
|
||||
|
|
|
@ -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.')],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class MigrateBookTest extends MigrateDrupal7TestBase {
|
|||
'd7_user',
|
||||
'd7_node_type',
|
||||
'd7_node',
|
||||
'd7_book'
|
||||
'd7_book',
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class DrupalImageCaption extends PluginBase implements CKEditorPluginInterface,
|
|||
*/
|
||||
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',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ class Language extends CKEditorPluginBase implements CKEditorPluginConfigurableI
|
|||
*/
|
||||
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',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ class StylesCombo extends CKEditorPluginBase implements CKEditorPluginConfigurab
|
|||
];
|
||||
if (!empty($classes)) {
|
||||
$configured_style['attributes'] = [
|
||||
'class' => implode(' ', array_map('trim', $classes))
|
||||
'class' => implode(' ', array_map('trim', $classes)),
|
||||
];
|
||||
}
|
||||
$styles_set[] = $configured_style;
|
||||
|
|
|
@ -210,8 +210,8 @@ class CKEditor extends EditorBase implements ContainerFactoryPluginInterface {
|
|||
0 => [
|
||||
'name' => 'All existing buttons',
|
||||
'items' => $all_buttons,
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'plugins' => $settings['plugins'],
|
||||
|
|
|
@ -32,7 +32,7 @@ class LlamaCss extends Llama implements CKEditorPluginButtonsInterface, CKEditor
|
|||
*/
|
||||
public function getCssFiles(Editor $editor) {
|
||||
return [
|
||||
drupal_get_path('module', 'ckeditor_test') . '/css/llama.css'
|
||||
drupal_get_path('module', 'ckeditor_test') . '/css/llama.css',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ class CKEditorPluginManagerTest extends KernelTestBase {
|
|||
|
||||
// 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.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class CKEditorTest extends KernelTestBase {
|
|||
'status' => 1,
|
||||
'settings' => [
|
||||
'allowed_html' => '<h2 id> <h3> <h4> <h5> <h6> <p> <br> <strong> <a href hreflang>',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
|
|
@ -20,7 +20,7 @@ class CKEditorPluginManagerTest extends UnitTestCase {
|
|||
return [
|
||||
'empty' => [
|
||||
[],
|
||||
[]
|
||||
[],
|
||||
],
|
||||
'1 row, 1 group' => [
|
||||
[
|
||||
|
@ -28,9 +28,9 @@ class CKEditorPluginManagerTest extends UnitTestCase {
|
|||
[
|
||||
// Group 1.
|
||||
['name' => 'Formatting', 'items' => ['Bold', 'Italic']],
|
||||
]
|
||||
],
|
||||
],
|
||||
['Bold', 'Italic']
|
||||
['Bold', 'Italic'],
|
||||
],
|
||||
'1 row, >1 groups' => [
|
||||
[
|
||||
|
@ -42,7 +42,7 @@ class CKEditorPluginManagerTest extends UnitTestCase {
|
|||
['name' => 'Linking', 'items' => ['Link']],
|
||||
],
|
||||
],
|
||||
['Bold', 'Italic', 'Link']
|
||||
['Bold', 'Italic', 'Link'],
|
||||
],
|
||||
'2 rows, 1 group each' => [
|
||||
[
|
||||
|
@ -76,7 +76,7 @@ class CKEditorPluginManagerTest extends UnitTestCase {
|
|||
['name' => 'Advanced', 'items' => ['Llama']],
|
||||
],
|
||||
],
|
||||
['Bold', 'Italic', 'Link', 'Source', 'Llama']
|
||||
['Bold', 'Italic', 'Link', 'Source', 'Llama'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -379,7 +379,7 @@ class CommentForm extends ContentEntityForm {
|
|||
// 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.
|
||||
|
|
|
@ -111,7 +111,7 @@ class CommentTypeForm extends EntityForm {
|
|||
'#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 {
|
||||
|
|
|
@ -214,7 +214,7 @@ class CommentViewsData extends EntityViewsData {
|
|||
[
|
||||
'field' => 'entity_type',
|
||||
'value' => $type,
|
||||
'table' => 'comment_field_data'
|
||||
'table' => 'comment_field_data',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -31,7 +31,7 @@ class CommentVariablePerCommentType extends CommentVariable {
|
|||
$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 @@ class CommentVariablePerCommentType extends CommentVariable {
|
|||
$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'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,9 +32,9 @@ class StatisticsLastCommentName extends FieldPluginBase {
|
|||
[
|
||||
'field' => 'uid',
|
||||
'operator' => '!=',
|
||||
'value' => '0'
|
||||
]
|
||||
]
|
||||
'value' => '0',
|
||||
],
|
||||
],
|
||||
];
|
||||
$join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $definition);
|
||||
|
||||
|
|
|
@ -329,7 +329,7 @@ class CommentPagerTest extends CommentTestBase {
|
|||
'settings' => [
|
||||
'pager_id' => 1,
|
||||
'view_mode' => 'default',
|
||||
]
|
||||
],
|
||||
])
|
||||
->save();
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class CommentAdminTest extends CommentTestBase {
|
|||
'comment_body' => $body,
|
||||
'entity_id' => $this->node->id(),
|
||||
'entity_type' => 'node',
|
||||
'field_name' => 'comment'
|
||||
'field_name' => 'comment',
|
||||
]);
|
||||
$this->drupalLogout();
|
||||
|
||||
|
@ -145,7 +145,7 @@ class CommentAdminTest extends CommentTestBase {
|
|||
'comment_body' => $body,
|
||||
'entity_id' => $this->node->id(),
|
||||
'entity_type' => 'node',
|
||||
'field_name' => 'comment'
|
||||
'field_name' => 'comment',
|
||||
]);
|
||||
$this->drupalLogout();
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class CommentCSSTest extends CommentTestBase {
|
|||
// Allow anonymous users to see comments.
|
||||
user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, [
|
||||
'access comments',
|
||||
'access content'
|
||||
'access content',
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ class CommentNonNodeTest extends BrowserTestBase {
|
|||
*/
|
||||
public function testCommentFunctionality() {
|
||||
$limited_user = $this->drupalCreateUser([
|
||||
'administer entity_test fields'
|
||||
'administer entity_test fields',
|
||||
]);
|
||||
$this->drupalLogin($limited_user);
|
||||
// Test that default field exists.
|
||||
|
|
|
@ -99,7 +99,7 @@ class CommentTranslationUITest extends ContentTranslationUITestBase {
|
|||
$node = $this->drupalCreateNode([
|
||||
'type' => $node_type,
|
||||
$field_name => [
|
||||
['status' => CommentItemInterface::OPEN]
|
||||
['status' => CommentItemInterface::OPEN],
|
||||
],
|
||||
]);
|
||||
$values['entity_id'] = $node->id();
|
||||
|
|
|
@ -119,7 +119,7 @@ class DefaultViewRecentCommentsTest extends ViewTestBase {
|
|||
$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) {
|
||||
|
|
|
@ -202,7 +202,7 @@ class CommentFieldAccessTest extends EntityKernelTestBase {
|
|||
// 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);
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class CommentValidationTest extends EntityKernelTestBase {
|
|||
'type' => 'comment',
|
||||
'settings' => [
|
||||
'comment_type' => 'comment',
|
||||
]
|
||||
],
|
||||
])->save();
|
||||
|
||||
// Create a page node type.
|
||||
|
|
|
@ -118,7 +118,7 @@ class CommentUserNameTest extends ViewsKernelTestBase {
|
|||
'field' => 'name',
|
||||
'id' => 'name',
|
||||
'plugin_id' => 'field',
|
||||
'type' => 'comment_username'
|
||||
'type' => 'comment_username',
|
||||
],
|
||||
'subject' => [
|
||||
'table' => 'comment_field_data',
|
||||
|
|
|
@ -214,12 +214,12 @@ class ConfigSync extends FormBase {
|
|||
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 @@ class ConfigSync extends FormBase {
|
|||
'class' => ['use-ajax'],
|
||||
'data-dialog-type' => 'modal',
|
||||
'data-dialog-options' => json_encode([
|
||||
'width' => 700
|
||||
'width' => 700,
|
||||
]),
|
||||
],
|
||||
];
|
||||
|
|
|
@ -18,7 +18,7 @@ class ConfigOverrider implements ConfigFactoryOverrideInterface {
|
|||
return [
|
||||
'config_test.dynamic.test_1' => [
|
||||
'label' => 'Overridden label',
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class EventSubscriber implements EventSubscriberInterface {
|
|||
'event_name' => $name,
|
||||
'current_config_data' => $config->get(),
|
||||
'original_config_data' => $config->getOriginal(),
|
||||
'raw_config_data' => $config->getRawData()
|
||||
'raw_config_data' => $config->getRawData(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class ConfigLanguageOverrideWebTest extends BrowserTestBase {
|
|||
public static $modules = [
|
||||
'block',
|
||||
'language',
|
||||
'system'
|
||||
'system',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -177,7 +177,7 @@ EOD;
|
|||
// 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');
|
||||
|
|
|
@ -263,7 +263,7 @@ class ConfigEntityMapper extends ConfigNamesMapper {
|
|||
$parameters += [
|
||||
$this->entityType => [
|
||||
'type' => 'entity:' . $this->entityType,
|
||||
]
|
||||
],
|
||||
];
|
||||
$route->setOption('parameters', $parameters);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class ConfigTranslationDateFormatUiTest extends BrowserTestBase {
|
|||
public static $modules = [
|
||||
'language',
|
||||
'config_translation',
|
||||
'system'
|
||||
'system',
|
||||
];
|
||||
|
||||
protected function setUp() {
|
||||
|
|
|
@ -189,7 +189,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase {
|
|||
$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 @@ class ConfigTranslationListUiTest extends BrowserTestBase {
|
|||
$block_content_type = BlockContentType::create([
|
||||
'id' => 'basic',
|
||||
'label' => 'Basic',
|
||||
'revision' => FALSE
|
||||
'revision' => FALSE,
|
||||
]);
|
||||
$block_content_type->save();
|
||||
$field = FieldConfig::create([
|
||||
|
|
|
@ -907,7 +907,7 @@ class ConfigTranslationUiTest extends BrowserTestBase {
|
|||
$expected = [
|
||||
'kitten',
|
||||
'llama',
|
||||
'elephant'
|
||||
'elephant',
|
||||
];
|
||||
$actual = $config_factory
|
||||
->getEditable('config_translation_test.content')
|
||||
|
|
|
@ -42,8 +42,8 @@ class I18nProfileFieldTest extends MigrateSqlSourceTestBase {
|
|||
'lid' => 11,
|
||||
'objectid' => 'profile_love_migrations',
|
||||
'type' => 'field',
|
||||
'property' => 'explanation'
|
||||
]
|
||||
'property' => 'explanation',
|
||||
],
|
||||
],
|
||||
'locales_target' => [
|
||||
[
|
||||
|
|
|
@ -41,8 +41,8 @@ class ProfileFieldTranslationTest extends MigrateSqlSourceTestBase {
|
|||
'lid' => 11,
|
||||
'objectid' => 'profile_love_migrations',
|
||||
'type' => 'field',
|
||||
'property' => 'explanation'
|
||||
]
|
||||
'property' => 'explanation',
|
||||
],
|
||||
],
|
||||
'locales_target' => [
|
||||
[
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue