summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2016-05-05 11:07:19 (GMT)
committerAlex Pott2016-05-05 11:07:19 (GMT)
commitd5d0d6ce87217edd419cd3b000e0e7232bd0e8c1 (patch)
tree87f359e6705c763e4b645834ee86dd230e7cbe94
parente0c2d965af68331e8e47fd20b62a2eabdbad9d08 (diff)
Issue #2572777 by andypost, alexpott, attiks, andriyun: Fix 'Squiz.Strings.ConcatenationSpacing' coding standard
-rw-r--r--core/includes/errors.inc2
-rw-r--r--core/includes/install.inc4
-rw-r--r--core/includes/update.inc2
-rw-r--r--core/lib/Drupal/Component/DependencyInjection/Container.php10
-rw-r--r--core/lib/Drupal/Component/Utility/Random.php4
-rw-r--r--core/lib/Drupal/Core/Asset/AssetDumper.php2
-rw-r--r--core/lib/Drupal/Core/Asset/AssetResolver.php2
-rw-r--r--core/lib/Drupal/Core/Asset/CssOptimizer.php2
-rw-r--r--core/lib/Drupal/Core/Entity/Query/QueryBase.php2
-rw-r--r--core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php2
-rw-r--r--core/lib/Drupal/Core/Routing/RouteProvider.php2
-rw-r--r--core/lib/Drupal/Core/Routing/UrlGenerator.php4
-rw-r--r--core/modules/automated_cron/automated_cron.module6
-rw-r--r--core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php2
-rw-r--r--core/modules/block/src/Plugin/migrate/source/Block.php2
-rw-r--r--core/modules/block/src/Tests/BlockRenderOrderTest.php2
-rw-r--r--core/modules/block/src/Tests/BlockUiTest.php4
-rw-r--r--core/modules/block_content/tests/modules/block_content_test/block_content_test.module6
-rw-r--r--core/modules/breakpoint/breakpoint.module2
-rw-r--r--core/modules/comment/src/Tests/CommentNewIndicatorTest.php2
-rw-r--r--core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php2
-rw-r--r--core/modules/config/config.module4
-rw-r--r--core/modules/config/src/Tests/ConfigExportImportUITest.php2
-rw-r--r--core/modules/config/src/Tests/ConfigInstallProfileOverrideTest.php2
-rw-r--r--core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php2
-rw-r--r--core/modules/contact/src/Tests/Views/ContactFieldsTest.php2
-rw-r--r--core/modules/editor/src/Tests/EditorAdminTest.php2
-rw-r--r--core/modules/field/field.module2
-rw-r--r--core/modules/field/src/Tests/EntityReference/EntityReferenceFieldDefaultValueTest.php8
-rw-r--r--core/modules/field/src/Tests/EntityReference/EntityReferenceIntegrationTest.php2
-rw-r--r--core/modules/field/src/Tests/Number/NumberFieldTest.php4
-rw-r--r--core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php2
-rw-r--r--core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php2
-rw-r--r--core/modules/field_ui/field_ui.module6
-rw-r--r--core/modules/field_ui/src/Tests/ManageDisplayTest.php4
-rw-r--r--core/modules/field_ui/src/Tests/ManageFieldsTest.php2
-rw-r--r--core/modules/file/src/Tests/FileFieldWidgetTest.php2
-rw-r--r--core/modules/file/src/Tests/FilePrivateTest.php4
-rw-r--r--core/modules/filter/filter.module6
-rw-r--r--core/modules/forum/forum.module2
-rw-r--r--core/modules/history/history.module2
-rw-r--r--core/modules/image/src/Tests/ImageDimensionsTest.php6
-rw-r--r--core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php4
-rw-r--r--core/modules/language/src/ConfigurableLanguageManager.php2
-rw-r--r--core/modules/language/src/Tests/LanguageListTest.php2
-rw-r--r--core/modules/language/src/Tests/LanguageNegotiationInfoTest.php2
-rw-r--r--core/modules/locale/src/Form/ExportForm.php2
-rw-r--r--core/modules/locale/src/Tests/LocaleContentTest.php2
-rw-r--r--core/modules/menu_ui/src/Tests/MenuNodeTest.php6
-rw-r--r--core/modules/menu_ui/src/Tests/MenuTest.php2
-rw-r--r--core/modules/migrate/tests/src/Unit/process/MachineNameTest.php2
-rw-r--r--core/modules/node/src/Tests/NodeTitleTest.php2
-rw-r--r--core/modules/node/tests/modules/node_test/node_test.module2
-rw-r--r--core/modules/page_cache/page_cache.module2
-rw-r--r--core/modules/path/src/Tests/PathAliasTest.php2
-rw-r--r--core/modules/quickedit/src/Tests/QuickEditAutocompleteTermTest.php4
-rw-r--r--core/modules/rest/src/Tests/UpdateTest.php2
-rw-r--r--core/modules/search/src/SearchQuery.php2
-rw-r--r--core/modules/search/src/Tests/SearchCommentTest.php2
-rw-r--r--core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php4
-rw-r--r--core/modules/simpletest/src/Tests/SimpleTestTest.php2
-rw-r--r--core/modules/simpletest/src/WebTestBase.php2
-rw-r--r--core/modules/simpletest/tests/src/Unit/SimpletestPhpunitRunCommandTest.php2
-rw-r--r--core/modules/statistics/src/Tests/StatisticsAdminTest.php6
-rw-r--r--core/modules/statistics/src/Tests/StatisticsReportsTest.php2
-rw-r--r--core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php2
-rw-r--r--core/modules/statistics/src/Tests/Views/IntegrationTest.php2
-rw-r--r--core/modules/system/src/Controller/DbUpdateController.php2
-rw-r--r--core/modules/system/src/Form/ModulesListForm.php2
-rw-r--r--core/modules/system/src/Tests/Batch/ProcessingTest.php2
-rw-r--r--core/modules/system/src/Tests/File/StreamWrapperTest.php2
-rw-r--r--core/modules/system/src/Tests/Image/ToolkitGdTest.php4
-rw-r--r--core/modules/system/src/Tests/Module/ModuleTestBase.php2
-rw-r--r--core/modules/system/src/Tests/ParamConverter/UpcastingTest.php2
-rw-r--r--core/modules/system/src/Tests/System/IndexPhpTest.php2
-rw-r--r--core/modules/system/src/Tests/System/SiteMaintenanceTest.php2
-rw-r--r--core/modules/system/src/Tests/Theme/FunctionsTest.php2
-rw-r--r--core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php4
-rw-r--r--core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc2
-rw-r--r--core/modules/system/tests/modules/batch_test/batch_test.module6
-rw-r--r--core/modules/taxonomy/src/Tests/TaxonomyImageTest.php2
-rw-r--r--core/modules/taxonomy/src/Tests/TermTest.php8
-rw-r--r--core/modules/taxonomy/src/Tests/TermTranslationUITest.php2
-rw-r--r--core/modules/taxonomy/src/Tests/Views/TaxonomyDefaultArgumentTest.php2
-rw-r--r--core/modules/taxonomy/src/Tests/Views/TaxonomyFieldAllTermsTest.php2
-rw-r--r--core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php2
-rw-r--r--core/modules/user/src/AccountForm.php4
-rw-r--r--core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php27
-rw-r--r--core/modules/views/src/Plugin/views/argument/Formula.php2
-rw-r--r--core/modules/views/src/Plugin/views/cache/Time.php2
-rw-r--r--core/modules/views/src/Plugin/views/field/FieldPluginBase.php8
-rw-r--r--core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php4
-rw-r--r--core/modules/views/src/Tests/Handler/AreaTest.php2
-rw-r--r--core/modules/views/src/Tests/ViewKernelTestBase.php2
-rw-r--r--core/modules/views/src/Tests/ViewTestBase.php2
-rw-r--r--core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php2
-rw-r--r--core/modules/views/views.module2
-rw-r--r--core/modules/views_ui/src/Tests/DisplayCRUDTest.php6
-rw-r--r--core/modules/views_ui/src/Tests/DisplayTest.php2
-rw-r--r--core/modules/views_ui/src/Tests/HandlerTest.php2
-rw-r--r--core/modules/views_ui/src/ViewEditForm.php2
-rw-r--r--core/phpcs.xml.dist8
-rw-r--r--core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php24
-rw-r--r--core/tests/Drupal/KernelTests/Core/Field/FieldModuleUninstallValidatorTest.php2
-rw-r--r--core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php2
-rw-r--r--core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php2
-rw-r--r--core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php4
-rw-r--r--core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php4
108 files changed, 191 insertions, 174 deletions
diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index 36d3a41..b96b828 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -181,7 +181,7 @@ function _drupal_log_error($error, $fatal = FALSE) {
if ($fatal) {
// When called from CLI, simply output a plain text message.
// Should not translate the string to avoid errors producing more errors.
- $response->setContent(html_entity_decode(strip_tags(SafeMarkup::format('%type: @message in %function (line %line of %file).', $error))). "\n");
+ $response->setContent(html_entity_decode(strip_tags(SafeMarkup::format('%type: @message in %function (line %line of %file).', $error))) . "\n");
$response->send();
exit;
}
diff --git a/core/includes/install.inc b/core/includes/install.inc
index 6578a83..31153a4 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -227,7 +227,7 @@ function drupal_rewrite_settings($settings = array(), $settings_file = NULL) {
else {
_drupal_rewrite_settings_global($settings_settings, $data);
}
- $variable_names['$'. $setting] = $setting;
+ $variable_names['$' . $setting] = $setting;
}
$contents = file_get_contents($settings_file);
if ($contents !== FALSE) {
@@ -515,7 +515,7 @@ function drupal_install_config_directories() {
// they can later be added to git. Since this directory is auto-created, we
// have to write out the README rather than just adding it to the drupal core
// repo.
- $text = 'This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync.' .' For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config';
+ $text = 'This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync.' . ' For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config';
file_put_contents(config_get_config_directory(CONFIG_SYNC_DIRECTORY) . '/README.txt', $text);
}
diff --git a/core/includes/update.inc b/core/includes/update.inc
index 68401a9..a07595e 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -326,7 +326,7 @@ function update_get_update_list() {
$updates = array_combine($updates, $updates);
foreach (array_keys($updates) as $update) {
if ($update == \Drupal::CORE_MINIMUM_SCHEMA_VERSION) {
- $ret[$module]['warning'] = '<em>' . $module . '</em> module cannot be updated. It contains an update numbered as ' . \Drupal::CORE_MINIMUM_SCHEMA_VERSION . ' which is reserved for the earliest installation of a module in Drupal ' . \Drupal::CORE_COMPATIBILITY . ', before any updates. In order to update <em>' . $module . '</em> module, you will need to install a version of the module with valid updates.';
+ $ret[$module]['warning'] = '<em>' . $module . '</em> module cannot be updated. It contains an update numbered as ' . \Drupal::CORE_MINIMUM_SCHEMA_VERSION . ' which is reserved for the earliest installation of a module in Drupal ' . \Drupal::CORE_COMPATIBILITY . ', before any updates. In order to update <em>' . $module . '</em> module, you will need to install a version of the module with valid updates.';
continue 2;
}
if ($update > $schema_version) {
diff --git a/core/lib/Drupal/Component/DependencyInjection/Container.php b/core/lib/Drupal/Component/DependencyInjection/Container.php
index 8b07eda..733490c 100644
--- a/core/lib/Drupal/Component/DependencyInjection/Container.php
+++ b/core/lib/Drupal/Component/DependencyInjection/Container.php
@@ -593,7 +593,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
*/
public function enterScope($name) {
if ('request' !== $name) {
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
+ @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
}
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
@@ -604,7 +604,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
*/
public function leaveScope($name) {
if ('request' !== $name) {
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
+ @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
}
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
@@ -617,7 +617,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
$name = $scope->getName();
if ('request' !== $name) {
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
+ @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
}
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
}
@@ -627,7 +627,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
*/
public function hasScope($name) {
if ('request' !== $name) {
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
+ @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
}
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
@@ -637,7 +637,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
* {@inheritdoc}
*/
public function isScopeActive($name) {
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
+ @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
}
diff --git a/core/lib/Drupal/Component/Utility/Random.php b/core/lib/Drupal/Component/Utility/Random.php
index 3d72b03..3a00839 100644
--- a/core/lib/Drupal/Component/Utility/Random.php
+++ b/core/lib/Drupal/Component/Utility/Random.php
@@ -251,7 +251,7 @@ class Random {
public function paragraphs($paragraph_count = 12) {
$output = '';
for ($i = 1; $i <= $paragraph_count; $i++) {
- $output .= $this->sentences(mt_rand(20, 60)) ."\n\n";
+ $output .= $this->sentences(mt_rand(20, 60)) . "\n\n";
}
return $output;
}
@@ -291,7 +291,7 @@ class Random {
$smaller_dimension = ($smaller_dimension % 2) ? $smaller_dimension : $smaller_dimension;
imageellipse($im, $width / 2, $height / 2, $smaller_dimension, $smaller_dimension, $color);
- $save_function = 'image'. ($extension == 'jpg' ? 'jpeg' : $extension);
+ $save_function = 'image' . ($extension == 'jpg' ? 'jpeg' : $extension);
$save_function($im, $destination);
return $destination;
}
diff --git a/core/lib/Drupal/Core/Asset/AssetDumper.php b/core/lib/Drupal/Core/Asset/AssetDumper.php
index 1f56c4a..227ef0c 100644
--- a/core/lib/Drupal/Core/Asset/AssetDumper.php
+++ b/core/lib/Drupal/Core/Asset/AssetDumper.php
@@ -19,7 +19,7 @@ class AssetDumper implements AssetDumperInterface {
public function dump($data, $file_extension) {
// Prefix filename to prevent blocking by firewalls which reject files
// starting with "ad*".
- $filename = $file_extension. '_' . Crypt::hashBase64($data) . '.' . $file_extension;
+ $filename = $file_extension . '_' . Crypt::hashBase64($data) . '.' . $file_extension;
// Create the css/ or js/ path within the files folder.
$path = 'public://' . $file_extension;
$uri = $path . '/' . $filename;
diff --git a/core/lib/Drupal/Core/Asset/AssetResolver.php b/core/lib/Drupal/Core/Asset/AssetResolver.php
index 79ac316..9e1bcce 100644
--- a/core/lib/Drupal/Core/Asset/AssetResolver.php
+++ b/core/lib/Drupal/Core/Asset/AssetResolver.php
@@ -214,7 +214,7 @@ class AssetResolver implements AssetResolverInterface {
// hook_library_info_alter(). Additionally add the current language to
// support translation of JavaScript files via hook_js_alter().
$libraries_to_load = $this->getLibrariesToLoad($assets);
- $cid = 'js:' . $theme_info->getName() . ':' . $this->languageManager->getCurrentLanguage()->getId() . ':' . Crypt::hashBase64(serialize($libraries_to_load) . serialize($assets->getLibraries())) . (int) (count($assets->getSettings()) > 0) . (int) $optimize;
+ $cid = 'js:' . $theme_info->getName() . ':' . $this->languageManager->getCurrentLanguage()->getId() . ':' . Crypt::hashBase64(serialize($libraries_to_load) . serialize($assets->getLibraries())) . (int) (count($assets->getSettings()) > 0) . (int) $optimize;
if ($cached = $this->cache->get($cid)) {
list($js_assets_header, $js_assets_footer, $settings, $settings_in_header) = $cached->data;
diff --git a/core/lib/Drupal/Core/Asset/CssOptimizer.php b/core/lib/Drupal/Core/Asset/CssOptimizer.php
index 2a316fa..87575e0 100644
--- a/core/lib/Drupal/Core/Asset/CssOptimizer.php
+++ b/core/lib/Drupal/Core/Asset/CssOptimizer.php
@@ -163,7 +163,7 @@ class CssOptimizer implements AssetOptimizerInterface {
$directory = dirname($filename);
// If the file is in the current directory, make sure '.' doesn't appear in
// the url() path.
- $directory = $directory == '.' ? '' : $directory .'/';
+ $directory = $directory == '.' ? '' : $directory . '/';
// Alter all internal url() paths. Leave external paths alone. We don't need
// to normalize absolute paths here because that will be done later.
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryBase.php b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
index 9acfb77..227d90c 100644
--- a/core/lib/Drupal/Core/Entity/Query/QueryBase.php
+++ b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
@@ -442,7 +442,7 @@ abstract class QueryBase implements QueryInterface {
* The alias for the field.
*/
protected function getAggregationAlias($field, $function) {
- return strtolower($field . '_'. $function);
+ return strtolower($field . '_' . $function);
}
/**
diff --git a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
index fd3e3b1..e2ffc05 100644
--- a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
@@ -94,7 +94,7 @@ class AjaxResponseSubscriber implements EventSubscriberInterface {
// the JSON data by making it the value of a textarea.
// @see http://malsup.com/jquery/form/#file-upload
// @see https://www.drupal.org/node/1009382
- $response->setContent('<textarea>' . $response->getContent() . '</textarea>');
+ $response->setContent('<textarea>' . $response->getContent() . '</textarea>');
}
// User-uploaded files cannot set any response headers, so a custom header
diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php
index 96a33a4..8c631d7 100644
--- a/core/lib/Drupal/Core/Routing/RouteProvider.php
+++ b/core/lib/Drupal/Core/Routing/RouteProvider.php
@@ -143,7 +143,7 @@ class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProv
public function getRouteCollectionForRequest(Request $request) {
// Cache both the system path as well as route parameters and matching
// routes.
- $cid = 'route:' . $request->getPathInfo() . ':' . $request->getQueryString();
+ $cid = 'route:' . $request->getPathInfo() . ':' . $request->getQueryString();
if ($cached = $this->cache->get($cid)) {
$this->currentPath->setPath($cached->data['path'], $request);
$request->query->replace($cached->data['query']);
diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php
index 6cff9d5..e7b7aa9 100644
--- a/core/lib/Drupal/Core/Routing/UrlGenerator.php
+++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php
@@ -188,7 +188,7 @@ class UrlGenerator implements UrlGeneratorInterface {
if ('variable' === $token[0]) {
if (!$optional || !array_key_exists($token[3], $defaults) || (isset($mergedParams[$token[3]]) && (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]])) {
// check requirement
- if (!preg_match('#^'.$token[2].'$#', $mergedParams[$token[3]])) {
+ if (!preg_match('#^' . $token[2] . '$#', $mergedParams[$token[3]])) {
$message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]);
throw new InvalidParameterException($message);
}
@@ -232,7 +232,7 @@ class UrlGenerator implements UrlGeneratorInterface {
if ($query_params && $query = http_build_query($query_params, '', '&')) {
// "/" and "?" can be left decoded for better user experience, see
// http://tools.ietf.org/html/rfc3986#section-3.4
- $url .= '?'.strtr($query, array('%2F' => '/'));
+ $url .= '?' . strtr($query, array('%2F' => '/'));
}
return $url;
diff --git a/core/modules/automated_cron/automated_cron.module b/core/modules/automated_cron/automated_cron.module
index fc9a21a..858236f 100644
--- a/core/modules/automated_cron/automated_cron.module
+++ b/core/modules/automated_cron/automated_cron.module
@@ -16,13 +16,13 @@ function automated_cron_help($route_name, RouteMatchInterface $route_match) {
case 'help.page.automated_cron':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
- $output .= '<p>' . t('The Automated Cron module runs cron operations for your site using normal browser/page requests instead of having to set up a separate cron job. The Automated Cron module checks at the end of each server response when cron operation was last ran and, if it has been too long since last run, it executes the cron tasks after sending a server response. For more information, see the <a href=":automated_cron-documentation">online documentation for the Automated Cron module</a>.', [':automated_cron-documentation' => 'https://www.drupal.org/documentation/modules/automated_cron']) . '</p>';
+ $output .= '<p>' . t('The Automated Cron module runs cron operations for your site using normal browser/page requests instead of having to set up a separate cron job. The Automated Cron module checks at the end of each server response when cron operation was last ran and, if it has been too long since last run, it executes the cron tasks after sending a server response. For more information, see the <a href=":automated_cron-documentation">online documentation for the Automated Cron module</a>.', [':automated_cron-documentation' => 'https://www.drupal.org/documentation/modules/automated_cron']) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Configuring Automated Cron') . '</dt>';
- $output .= '<dd>' . t('On the <a href=":cron-settings">Cron page</a>, you can set the frequency (time interval) for running cron jobs.', [':cron-settings' => \Drupal::url('system.cron_settings')]) . '</dd>';
+ $output .= '<dd>' . t('On the <a href=":cron-settings">Cron page</a>, you can set the frequency (time interval) for running cron jobs.', [':cron-settings' => \Drupal::url('system.cron_settings')]) . '</dd>';
$output .= '<dt>' . t('Disabling Automated Cron') . '</dt>';
- $output .= '<dd>' . t('To disable automated cron, the recommended method is to uninstall the module, to reduce site overhead. If you only want to disable it temporarily, you can set the frequency to Never on the Cron page, and then change the frequency back when you want to start it up again.') . '</dd>';
+ $output .= '<dd>' . t('To disable automated cron, the recommended method is to uninstall the module, to reduce site overhead. If you only want to disable it temporarily, you can set the frequency to Never on the Cron page, and then change the frequency back when you want to start it up again.') . '</dd>';
$output .= '</dl>';
return $output;
}
diff --git a/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php b/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php
index ae5cf1c..91ad604 100644
--- a/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php
+++ b/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php
@@ -221,7 +221,7 @@ class BigPipeStrategy implements PlaceholderStrategyInterface {
*/
protected static function createBigPipeNoJsPlaceholder($original_placeholder, array $placeholder_render_array, $placeholder_must_be_attribute_safe = FALSE) {
if (!$placeholder_must_be_attribute_safe) {
- $big_pipe_placeholder = '<div data-big-pipe-nojs-placeholder-id="' . Html::escape(static::generateBigPipePlaceholderId($original_placeholder, $placeholder_render_array)) . '"></div>';
+ $big_pipe_placeholder = '<div data-big-pipe-nojs-placeholder-id="' . Html::escape(static::generateBigPipePlaceholderId($original_placeholder, $placeholder_render_array)) . '"></div>';
}
else {
$big_pipe_placeholder = 'big_pipe_nojs_placeholder_attribute_safe:' . Html::escape($original_placeholder);
diff --git a/core/modules/block/src/Plugin/migrate/source/Block.php b/core/modules/block/src/Plugin/migrate/source/Block.php
index b0fbff8..87414a0 100644
--- a/core/modules/block/src/Plugin/migrate/source/Block.php
+++ b/core/modules/block/src/Plugin/migrate/source/Block.php
@@ -138,7 +138,7 @@ class Block extends DrupalSqlBase {
$settings['book']['block_mode'] = $this->variableGet('book_block_mode', 'all pages');
break;
case 'forum':
- $settings['forum']['block_num'] = $this->variableGet('forum_block_num_'. $delta, 5);
+ $settings['forum']['block_num'] = $this->variableGet('forum_block_num_' . $delta, 5);
break;
case 'statistics':
foreach (array('statistics_block_top_day_num', 'statistics_block_top_all_num', 'statistics_block_top_last_num') as $name) {
diff --git a/core/modules/block/src/Tests/BlockRenderOrderTest.php b/core/modules/block/src/Tests/BlockRenderOrderTest.php
index 13b7fa3..6757c0b 100644
--- a/core/modules/block/src/Tests/BlockRenderOrderTest.php
+++ b/core/modules/block/src/Tests/BlockRenderOrderTest.php
@@ -69,7 +69,7 @@ class BlockRenderOrderTest extends WebTestBase {
foreach ($controller->loadMultiple() as $return_block) {
$id = $return_block->id();
if ($return_block_weight = $return_block->getWeight()) {
- $this->assertTrue($test_blocks[$id]['weight'] == $return_block_weight, 'Block weight is set as "' . $return_block_weight . '" for ' . $id . ' block.');
+ $this->assertTrue($test_blocks[$id]['weight'] == $return_block_weight, 'Block weight is set as "' . $return_block_weight . '" for ' . $id . ' block.');
$position[$id] = strpos($test_content, Html::getClass('block-' . $test_blocks[$id]['id']));
}
}
diff --git a/core/modules/block/src/Tests/BlockUiTest.php b/core/modules/block/src/Tests/BlockUiTest.php
index 5d38cd6..5ea62cd 100644
--- a/core/modules/block/src/Tests/BlockUiTest.php
+++ b/core/modules/block/src/Tests/BlockUiTest.php
@@ -119,12 +119,12 @@ class BlockUiTest extends WebTestBase {
foreach ($this->blockValues as $values) {
// Check if the region and weight settings changes have persisted.
$this->assertOptionSelected(
- 'edit-blocks-' . $values['settings']['id'] . '-region',
+ 'edit-blocks-' . $values['settings']['id'] . '-region',
'header',
'The block "' . $label . '" has the correct region assignment (header).'
);
$this->assertOptionSelected(
- 'edit-blocks-' . $values['settings']['id'] . '-weight',
+ 'edit-blocks-' . $values['settings']['id'] . '-weight',
$values['test_weight'],
'The block "' . $label . '" has the correct weight assignment (' . $values['test_weight'] . ').'
);
diff --git a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module b/core/modules/block_content/tests/modules/block_content_test/block_content_test.module
index 3450b5f..57ea2a6 100644
--- a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module
+++ b/core/modules/block_content/tests/modules/block_content_test/block_content_test.module
@@ -25,12 +25,12 @@ function block_content_test_block_content_view(array &$build, BlockContent $bloc
*/
function block_content_test_block_content_presave(BlockContent $block_content) {
if ($block_content->label() == 'testing_block_content_presave') {
- $block_content->setInfo($block_content->label() .'_presave');
+ $block_content->setInfo($block_content->label() . '_presave');
}
// Determine changes.
if (!empty($block_content->original) && $block_content->original->label() == 'test_changes') {
if ($block_content->original->label() != $block_content->label()) {
- $block_content->setInfo($block_content->label() .'_presave');
+ $block_content->setInfo($block_content->label() . '_presave');
// Drupal 1.0 release.
$block_content->changed = 979534800;
}
@@ -44,7 +44,7 @@ function block_content_test_block_content_update(BlockContent $block_content) {
// Determine changes on update.
if (!empty($block_content->original) && $block_content->original->label() == 'test_changes') {
if ($block_content->original->label() != $block_content->label()) {
- $block_content->setInfo($block_content->label() .'_update');
+ $block_content->setInfo($block_content->label() . '_update');
}
}
}
diff --git a/core/modules/breakpoint/breakpoint.module b/core/modules/breakpoint/breakpoint.module
index 538afe6..103edd9 100644
--- a/core/modules/breakpoint/breakpoint.module
+++ b/core/modules/breakpoint/breakpoint.module
@@ -15,7 +15,7 @@ function breakpoint_help($route_name, RouteMatchInterface $route_match) {
case 'help.page.breakpoint':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
- $output .= '<p>' . t('The Breakpoint module keeps track of the height, width, and resolution breakpoints where a responsive design needs to change in order to respond to different devices being used to view the site. This module does not have a user interface. For more information, see the <a href=":docs">online documentation for the Breakpoint module</a>.', array(':docs' => 'https://www.drupal.org/documentation/modules/breakpoint')) . '</p>';
+ $output .= '<p>' . t('The Breakpoint module keeps track of the height, width, and resolution breakpoints where a responsive design needs to change in order to respond to different devices being used to view the site. This module does not have a user interface. For more information, see the <a href=":docs">online documentation for the Breakpoint module</a>.', array(':docs' => 'https://www.drupal.org/documentation/modules/breakpoint')) . '</p>';
$output .= '<h4>' . t('Terminology') . '</h4>';
$output .= '<dl>';
$output .= '<dt>' . t('Breakpoint') . '</dt>';
diff --git a/core/modules/comment/src/Tests/CommentNewIndicatorTest.php b/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
index dab878e..6d89d4a 100644
--- a/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
+++ b/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
@@ -104,7 +104,7 @@ class CommentNewIndicatorTest extends CommentTestBase {
// value, the drupal.node-new-comments-link library would determine that the
// node received a comment after the user last viewed it, and hence it would
// perform an HTTP request to render the "new comments" node link.
- $this->assertIdentical(1, count($this->xpath('//*[@data-history-node-last-comment-timestamp="' . $comment->getChangedTime() . '"]')), 'data-history-node-last-comment-timestamp attribute is set to the correct value.');
+ $this->assertIdentical(1, count($this->xpath('//*[@data-history-node-last-comment-timestamp="' . $comment->getChangedTime() . '"]')), 'data-history-node-last-comment-timestamp attribute is set to the correct value.');
$this->assertIdentical(1, count($this->xpath('//*[@data-history-node-field-name="comment"]')), 'data-history-node-field-name attribute is set to the correct value.');
// The data will be pre-seeded on this particular page in drupalSettings, to
// avoid the need for the client to make a separate request to the server.
diff --git a/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
index ff67559..cf21289 100644
--- a/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
@@ -80,7 +80,7 @@ class CommentDefaultFormatterCacheTagsTest extends EntityKernelTestBase {
$renderer->renderRoot($build);
$expected_cache_tags = [
'entity_test_view',
- 'entity_test:' . $commented_entity->id(),
+ 'entity_test:' . $commented_entity->id(),
'config:core.entity_form_display.comment.comment.default',
'config:field.field.comment.comment.comment_body',
'config:field.field.entity_test.entity_test.comment',
diff --git a/core/modules/config/config.module b/core/modules/config/config.module
index 73baee4..4f31e08 100644
--- a/core/modules/config/config.module
+++ b/core/modules/config/config.module
@@ -22,7 +22,7 @@ function config_help($route_name, RouteMatchInterface $route_match) {
$output .= '<dd>' . t('You can create and download an archive consisting of all your site\'s configuration exported as <em>*.yml</em> files on the <a href=":url">Export</a> page.', array(':url' => \Drupal::url('config.export_full'))) . '</dd>';
$output .= '<dt>' . t('Importing a full configuration') . '</dt>';
$output .= '<dd>' . t('You can upload a full site configuration from an archive file on the <a href=":url">Import</a> page. When importing data from a different environment, the site and import files must have matching configuration values for UUID in the <em>system.site</em> configuration item. That means that your other environments should initially be set up as clones of the target site. Migrations are not supported.', array(':url' => \Drupal::url('config.import_full'))) . '</dd>';
- $output .= '<dt>' . t('Synchronizing configuration'). '</dt>';
+ $output .= '<dt>' . t('Synchronizing configuration') . '</dt>';
$output .= '<dd>' . t('You can review differences between the active configuration and an imported configuration archive on the <a href=":synchronize">Synchronize</a> page to ensure that the changes are as expected, before finalizing the import. The Synchronize page also shows configuration items that would be added or removed.', array(':synchronize' => \Drupal::url('config.sync'))) . '</dd>';
$output .= '<dt>' . t('Exporting a single configuration item') . '</dt>';
$output .= '<dd>' . t('You can export a single configuration item by selecting a <em>Configuration type</em> and <em>Configuration name</em> on the <a href=":single-export">Single export</a> page. The configuration and its corresponding <em>*.yml file name</em> are then displayed on the page for you to copy.', array(':single-export' => \Drupal::url('config.export_single'))) . '</dd>';
@@ -69,7 +69,7 @@ function config_file_download($uri) {
$date = DateTime::createFromFormat('U', $request->server->get('REQUEST_TIME'));
$date_string = $date->format('Y-m-d-H-i');
$hostname = str_replace('.', '-', $request->getHttpHost());
- $filename = 'config' . '-' . $hostname . '-' . $date_string. '.tar.gz';
+ $filename = 'config' . '-' . $hostname . '-' . $date_string . '.tar.gz';
$disposition = 'attachment; filename="' . $filename . '"';
return array(
'Content-disposition' => $disposition,
diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/src/Tests/ConfigExportImportUITest.php
index 62e7717..828d4aa 100644
--- a/core/modules/config/src/Tests/ConfigExportImportUITest.php
+++ b/core/modules/config/src/Tests/ConfigExportImportUITest.php
@@ -226,7 +226,7 @@ class ConfigExportImportUITest extends WebTestBase {
// Export the configuration.
$this->drupalPostForm('admin/config/development/configuration/full/export', array(), 'Export');
$this->tarball = $this->getRawContent();
- $filename = file_directory_temp() .'/' . $this->randomMachineName();
+ $filename = file_directory_temp() . '/' . $this->randomMachineName();
file_put_contents($filename, $this->tarball);
// Set up the active storage collections to test import.
diff --git a/core/modules/config/src/Tests/ConfigInstallProfileOverrideTest.php b/core/modules/config/src/Tests/ConfigInstallProfileOverrideTest.php
index 34b2916..c2cea6d 100644
--- a/core/modules/config/src/Tests/ConfigInstallProfileOverrideTest.php
+++ b/core/modules/config/src/Tests/ConfigInstallProfileOverrideTest.php
@@ -49,7 +49,7 @@ class ConfigInstallProfileOverrideTest extends WebTestBase {
// Verify that the original data matches. We have to read the module config
// file directly, because the install profile default system.cron.yml
// configuration file was used to create the active configuration.
- $config_dir = drupal_get_path('module', 'system') . '/'. InstallStorage::CONFIG_INSTALL_DIRECTORY;
+ $config_dir = drupal_get_path('module', 'system') . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
$this->assertTrue(is_dir($config_dir));
$source_storage = new FileStorage($config_dir);
$data = $source_storage->read($config_name);
diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php
index 911f6e2..7d0af41 100644
--- a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php
+++ b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php
@@ -526,7 +526,7 @@ class ConfigTranslationUiTest extends WebTestBase {
$this->drupalGet('admin/config/people/accounts/translate/fr/edit');
foreach ($edit as $key => $value) {
// Check the translations appear in the right field type as well.
- $xpath = '//' . (strpos($key, '[body]') ? 'textarea' : 'input') . '[@name="'. $key . '"]';
+ $xpath = '//' . (strpos($key, '[body]') ? 'textarea' : 'input') . '[@name="' . $key . '"]';
$this->assertFieldByXPath($xpath, $value);
}
// Check that labels for email settings appear.
diff --git a/core/modules/contact/src/Tests/Views/ContactFieldsTest.php b/core/modules/contact/src/Tests/Views/ContactFieldsTest.php
index 819558c..cf70799 100644
--- a/core/modules/contact/src/Tests/Views/ContactFieldsTest.php
+++ b/core/modules/contact/src/Tests/Views/ContactFieldsTest.php
@@ -57,7 +57,7 @@ class ContactFieldsTest extends ViewTestBase {
public function testViewsData() {
// Test that the field is not exposed to views, since contact_message
// entities have no storage.
- $table_name = 'contact_message__' . $this->fieldStorage->getName();
+ $table_name = 'contact_message__' . $this->fieldStorage->getName();
$data = $this->container->get('views.views_data')->get($table_name);
$this->assertFalse($data, 'The field is not exposed to Views.');
}
diff --git a/core/modules/editor/src/Tests/EditorAdminTest.php b/core/modules/editor/src/Tests/EditorAdminTest.php
index dcbd368..97d47b1 100644
--- a/core/modules/editor/src/Tests/EditorAdminTest.php
+++ b/core/modules/editor/src/Tests/EditorAdminTest.php
@@ -223,7 +223,7 @@ class EditorAdminTest extends WebTestBase {
$settings = $editor->getSettings();
$this->assertIdentical($editor->getEditor(), 'unicorn', 'The text editor is configured correctly.');
$this->assertIdentical($settings['ponies_too'], $ponies_too, 'The text editor settings are stored correctly.');
- $this->drupalGet('admin/config/content/formats/manage/'. $format_id);
+ $this->drupalGet('admin/config/content/formats/manage/' . $format_id);
$select = $this->xpath('//select[@name="editor[editor]"]');
$select_is_disabled = $this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]');
$options = $this->xpath('//select[@name="editor[editor]"]/option');
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index 5fb3ae3..053ab4a 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -69,7 +69,7 @@ function field_help($route_name, RouteMatchInterface $route_match) {
$field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#';
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
- $output .= '<p>' . t('The Field module allows custom data fields to be defined for <em>entity</em> types (see below). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the <a href=":field-ui-help">Field UI module</a> user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the <a href=":field">online documentation for the Field module</a>.', array(':field-ui-help' => $field_ui_url, ':field' => 'https://www.drupal.org/documentation/modules/field')). '</p>';
+ $output .= '<p>' . t('The Field module allows custom data fields to be defined for <em>entity</em> types (see below). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the <a href=":field-ui-help">Field UI module</a> user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the <a href=":field">online documentation for the Field module</a>.', array(':field-ui-help' => $field_ui_url, ':field' => 'https://www.drupal.org/documentation/modules/field')) . '</p>';
$output .= '<h3>' . t('Terminology') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Entities and entity types') . '</dt>';
diff --git a/core/modules/field/src/Tests/EntityReference/EntityReferenceFieldDefaultValueTest.php b/core/modules/field/src/Tests/EntityReference/EntityReferenceFieldDefaultValueTest.php
index 4524c88..6433958 100644
--- a/core/modules/field/src/Tests/EntityReference/EntityReferenceFieldDefaultValueTest.php
+++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceFieldDefaultValueTest.php
@@ -74,13 +74,13 @@ class EntityReferenceFieldDefaultValueTest extends WebTestBase {
// Set created node as default_value.
$field_edit = array(
- 'default_value_input[' . $field_name . '][0][target_id]' => $referenced_node->getTitle() . ' (' .$referenced_node->id() . ')',
+ 'default_value_input[' . $field_name . '][0][target_id]' => $referenced_node->getTitle() . ' (' . $referenced_node->id() . ')',
);
$this->drupalPostForm('admin/structure/types/manage/reference_content/fields/node.reference_content.' . $field_name, $field_edit, t('Save settings'));
// Check that default value is selected in default value form.
$this->drupalGet('admin/structure/types/manage/reference_content/fields/node.reference_content.' . $field_name);
- $this->assertRaw('name="default_value_input[' . $field_name . '][0][target_id]" value="' . $referenced_node->getTitle() .' (' .$referenced_node->id() . ')', 'The default value is selected in instance settings page');
+ $this->assertRaw('name="default_value_input[' . $field_name . '][0][target_id]" value="' . $referenced_node->getTitle() . ' (' . $referenced_node->id() . ')', 'The default value is selected in instance settings page');
// Check if the ID has been converted to UUID in config entity.
$config_entity = $this->config('field.field.node.reference_content.' . $field_name)->get();
@@ -137,8 +137,8 @@ class EntityReferenceFieldDefaultValueTest extends WebTestBase {
// Set created node as default_value.
$field_edit = array(
- 'default_value_input[' . $field_name . '][0][target_id]' => $referenced_node_type->label() . ' (' .$referenced_node_type->id() . ')',
- 'default_value_input[' . $field_name . '][1][target_id]' => $referenced_node_type2->label() . ' (' .$referenced_node_type2->id() . ')',
+ 'default_value_input[' . $field_name . '][0][target_id]' => $referenced_node_type->label() . ' (' . $referenced_node_type->id() . ')',
+ 'default_value_input[' . $field_name . '][1][target_id]' => $referenced_node_type2->label() . ' (' . $referenced_node_type2->id() . ')',
);
$this->drupalPostForm('admin/structure/types/manage/reference_content/fields/node.reference_content.' . $field_name, $field_edit, t('Save settings'));
diff --git a/core/modules/field/src/Tests/EntityReference/EntityReferenceIntegrationTest.php b/core/modules/field/src/Tests/EntityReference/EntityReferenceIntegrationTest.php
index 0514d97..bae3041 100644
--- a/core/modules/field/src/Tests/EntityReference/EntityReferenceIntegrationTest.php
+++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceIntegrationTest.php
@@ -142,7 +142,7 @@ class EntityReferenceIntegrationTest extends WebTestBase {
if ($key == 'content') {
$field_edit['settings[handler_settings][target_bundles][' . $referenced_entities[0]->getEntityTypeId() . ']'] = TRUE;
}
- $this->drupalPostForm($this->entityType . '/structure/' . $this->bundle .'/fields/' . $this->entityType . '.' . $this->bundle . '.' . $this->fieldName, $field_edit, t('Save settings'));
+ $this->drupalPostForm($this->entityType . '/structure/' . $this->bundle . '/fields/' . $this->entityType . '.' . $this->bundle . '.' . $this->fieldName, $field_edit, t('Save settings'));
// Ensure the configuration has the expected dependency on the entity that
// is being used a default value.
$field = FieldConfig::loadByName($this->entityType, $this->bundle, $this->fieldName);
diff --git a/core/modules/field/src/Tests/Number/NumberFieldTest.php b/core/modules/field/src/Tests/Number/NumberFieldTest.php
index 342f6dd..366024c 100644
--- a/core/modules/field/src/Tests/Number/NumberFieldTest.php
+++ b/core/modules/field/src/Tests/Number/NumberFieldTest.php
@@ -551,11 +551,11 @@ class NumberFieldTest extends WebTestBase {
);
$this->drupalPostForm($field_configuration_url, $edit, t('Save settings'));
// Check if an error message is shown.
- $this->assertNoRaw(t('%name is not a valid number.', array('%name' => t('Minimum'))), 'Saved ' . gettype($minimum_value) .' value as minimal value on a ' . $field->getType() . ' field');
+ $this->assertNoRaw(t('%name is not a valid number.', array('%name' => t('Minimum'))), 'Saved ' . gettype($minimum_value) . ' value as minimal value on a ' . $field->getType() . ' field');
// Check if a success message is shown.
$this->assertRaw(t('Saved %label configuration.', array('%label' => $field->getLabel())));
// Check if the minimum value was actually set.
$this->drupalGet($field_configuration_url);
- $this->assertFieldById('edit-settings-min', $minimum_value, 'Minimal ' . gettype($minimum_value) .' value was set on a ' . $field->getType() . ' field.');
+ $this->assertFieldById('edit-settings-min', $minimum_value, 'Minimal ' . gettype($minimum_value) . ' value was set on a ' . $field->getType() . ' field.');
}
}
diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php
index 4894a11..28c5d6c 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php
@@ -195,7 +195,7 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase {
</div>
';
$renderer->renderRoot($build[0]);
- $this->assertEqual($build[0]['#markup'], 'default | ' . $this->referencedEntity->label() . $expected_rendered_name_field_1 . $expected_rendered_body_field_1, sprintf('The markup returned by the %s formatter is correct for an item with a saved entity.', $formatter));
+ $this->assertEqual($build[0]['#markup'], 'default | ' . $this->referencedEntity->label() . $expected_rendered_name_field_1 . $expected_rendered_body_field_1, sprintf('The markup returned by the %s formatter is correct for an item with a saved entity.', $formatter));
$expected_cache_tags = Cache::mergeTags(\Drupal::entityManager()->getViewBuilder($this->entityType)->getCacheTags(), $this->referencedEntity->getCacheTags());
$expected_cache_tags = Cache::mergeTags($expected_cache_tags, FilterFormat::load('full_html')->getCacheTags());
$this->assertEqual($build[0]['#cache']['tags'], $expected_cache_tags, format_string('The @formatter formatter has the expected cache tags.', array('@formatter' => $formatter)));
diff --git a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
index 1af4ac6..8237ef4 100644
--- a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
@@ -370,7 +370,7 @@ class FieldAttachStorageTest extends FieldKernelTestBase {
// Verify that the fields are gone.
$this->assertFalse(FieldConfig::load('entity_test.' . $this->fieldTestData->field->getTargetBundle() . '.' . $this->fieldTestData->field_name), "First field is deleted");
- $this->assertFalse(FieldConfig::load('entity_test.' . $field['bundle']. '.' . $field_name), "Second field is deleted");
+ $this->assertFalse(FieldConfig::load('entity_test.' . $field['bundle'] . '.' . $field_name), "Second field is deleted");
}
}
diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module
index 1517e5f..5134cad 100644
--- a/core/modules/field_ui/field_ui.module
+++ b/core/modules/field_ui/field_ui.module
@@ -144,7 +144,7 @@ function field_ui_entity_operation(EntityInterface $entity) {
// of another and that type has field UI enabled.
if (($bundle_of = $info->getBundleOf()) && \Drupal::entityManager()->getDefinition($bundle_of)->get('field_ui_base_route')) {
$account = \Drupal::currentUser();
- if ($account->hasPermission('administer '. $bundle_of . ' fields')) {
+ if ($account->hasPermission('administer ' . $bundle_of . ' fields')) {
$operations['manage-fields'] = array(
'title' => t('Manage fields'),
'weight' => 15,
@@ -153,7 +153,7 @@ function field_ui_entity_operation(EntityInterface $entity) {
)),
);
}
- if ($account->hasPermission('administer '. $bundle_of . ' form display')) {
+ if ($account->hasPermission('administer ' . $bundle_of . ' form display')) {
$operations['manage-form-display'] = array(
'title' => t('Manage form display'),
'weight' => 20,
@@ -162,7 +162,7 @@ function field_ui_entity_operation(EntityInterface $entity) {
)),
);
}
- if ($account->hasPermission('administer '. $bundle_of . ' display')) {
+ if ($account->hasPermission('administer ' . $bundle_of . ' display')) {
$operations['manage-display'] = array(
'title' => t('Manage display'),
'weight' => 25,
diff --git a/core/modules/field_ui/src/Tests/ManageDisplayTest.php b/core/modules/field_ui/src/Tests/ManageDisplayTest.php
index 35ceb3c..b135186 100644
--- a/core/modules/field_ui/src/Tests/ManageDisplayTest.php
+++ b/core/modules/field_ui/src/Tests/ManageDisplayTest.php
@@ -304,7 +304,7 @@ class ManageDisplayTest extends WebTestBase {
$field_test_with_prepare_view_settings = $formatter_plugin_manager->getDefaultSettings('field_test_with_prepare_view');
$output = array(
'field_test_default' => $field_test_default_settings['test_formatter_setting'] . '|' . $value,
- 'field_test_with_prepare_view' => $field_test_with_prepare_view_settings['test_formatter_setting_additional'] . '|' . $value. '|' . ($value + 1),
+ 'field_test_with_prepare_view' => $field_test_with_prepare_view_settings['test_formatter_setting_additional'] . '|' . $value . '|' . ($value + 1),
);
// Check that the field is displayed with the default formatter in 'rss'
@@ -470,7 +470,7 @@ class ManageDisplayTest extends WebTestBase {
$clone = clone $node;
$element = node_view($clone, $view_mode);
$output = \Drupal::service('renderer')->renderRoot($element);
- $this->verbose(t('Rendered node - view mode: @view_mode', array('@view_mode' => $view_mode)) . '<hr />'. $output);
+ $this->verbose(t('Rendered node - view mode: @view_mode', array('@view_mode' => $view_mode)) . '<hr />' . $output);
// Assign content so that WebTestBase functions can be used.
$this->setRawContent($output);
diff --git a/core/modules/field_ui/src/Tests/ManageFieldsTest.php b/core/modules/field_ui/src/Tests/ManageFieldsTest.php
index c37e1e0..673b731 100644
--- a/core/modules/field_ui/src/Tests/ManageFieldsTest.php
+++ b/core/modules/field_ui/src/Tests/ManageFieldsTest.php
@@ -79,7 +79,7 @@ class ManageFieldsTest extends WebTestBase {
// Create random field name with markup to test escaping.
$this->fieldLabel = '<em>' . $this->randomMachineName(8) . '</em>';
$this->fieldNameInput = strtolower($this->randomMachineName(8));
- $this->fieldName = 'field_'. $this->fieldNameInput;
+ $this->fieldName = 'field_' . $this->fieldNameInput;
// Create Basic page and Article node types.
$this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
diff --git a/core/modules/file/src/Tests/FileFieldWidgetTest.php b/core/modules/file/src/Tests/FileFieldWidgetTest.php
index a6ca642..a0d0393 100644
--- a/core/modules/file/src/Tests/FileFieldWidgetTest.php
+++ b/core/modules/file/src/Tests/FileFieldWidgetTest.php
@@ -191,7 +191,7 @@ class FileFieldWidgetTest extends FileFieldTestBase {
$check_field_name = $field_name;
}
- $this->assertIdentical((string) $button['name'], $check_field_name . '_' . $key. '_remove_button');
+ $this->assertIdentical((string) $button['name'], $check_field_name . '_' . $key . '_remove_button');
}
// "Click" the remove button (emulating either a nojs or js submission).
diff --git a/core/modules/file/src/Tests/FilePrivateTest.php b/core/modules/file/src/Tests/FilePrivateTest.php
index 9355de1..9f2ba0b 100644
--- a/core/modules/file/src/Tests/FilePrivateTest.php
+++ b/core/modules/file/src/Tests/FilePrivateTest.php
@@ -75,9 +75,9 @@ class FilePrivateTest extends FileFieldTestBase {
$this->drupalPostForm('node/add/' . $type_name, $edit, t('Save and publish'));
$new_node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
$edit[$field_name . '[0][fids]'] = $node_file->id();
- $this->drupalPostForm('node/' . $new_node->id() .'/edit', $edit, t('Save and keep published'));
+ $this->drupalPostForm('node/' . $new_node->id() . '/edit', $edit, t('Save and keep published'));
// Make sure the form submit failed - we stayed on the edit form.
- $this->assertUrl('node/' . $new_node->id() .'/edit');
+ $this->assertUrl('node/' . $new_node->id() . '/edit');
// Check that we got the expected constraint form error.
$constraint = new ReferenceAccessConstraint();
$this->assertRaw(SafeMarkup::format($constraint->message, array('%type' => 'file', '%id' => $node_file->id())));
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 9385b66..f52614a 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -487,7 +487,7 @@ function _filter_url($text, $filter) {
// Allow URL paths to contain balanced parens
// 1. Used in Wikipedia URLs like /Primer_(film)
// 2. Used in IIS sessions like /S(dfd346)/
- $valid_url_balanced_parens = '\('. $valid_url_path_characters . '+\)';
+ $valid_url_balanced_parens = '\(' . $valid_url_path_characters . '+\)';
// Valid end-of-path characters (so /foo. does not gobble the period).
// 1. Allow =&# for empty URL parameters and other URL-join artifacts
@@ -498,7 +498,7 @@ function _filter_url($text, $filter) {
//full path
//and allow @ in a url, but only in the middle. Catch things like http://example.com/@user/
- $valid_url_path = '(?:(?:'.$valid_url_path_characters . '*(?:'.$valid_url_balanced_parens .$valid_url_path_characters . '*)*'. $valid_url_ending_characters . ')|(?:@' . $valid_url_path_characters . '+\/))';
+ $valid_url_path = '(?:(?:' . $valid_url_path_characters . '*(?:' . $valid_url_balanced_parens . $valid_url_path_characters . '*)*' . $valid_url_ending_characters . ')|(?:@' . $valid_url_path_characters . '+\/))';
// Prepare domain name pattern.
// The ICANN seems to be on track towards accepting more diverse top level
@@ -507,7 +507,7 @@ function _filter_url($text, $filter) {
$domain = '(?:[\p{L}\p{M}\p{N}._+-]+\.)?[\p{L}\p{M}]{2,64}\b';
$ip = '(?:[0-9]{1,3}\.){3}[0-9]{1,3}';
$auth = '[\p{L}\p{M}\p{N}:%_+*~#?&=.,/;-]+@';
- $trail = '('.$valid_url_path.'*)?(\\?'.$valid_url_query_chars .'*'.$valid_url_query_ending_chars.')?';
+ $trail = '(' . $valid_url_path . '*)?(\\?' . $valid_url_query_chars . '*' . $valid_url_query_ending_chars . ')?';
// Match absolute URLs.
$url_pattern = "(?:$auth)?(?:$domain|$ip)/?(?:$trail)?";
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 42d5349..3e3cc33 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -29,7 +29,7 @@ function forum_help($route_name, RouteMatchInterface $route_match) {
$output .= '<li>' . t('<em>Forums</em> (for example, <em>Recipes for cooking vegetables</em>)') . '</li>';
$output .= '<li>' . t('<em>Forum topics</em> submitted by users (for example, <em>How to cook potatoes</em>), which start discussions.') . '</li>';
$output .= '<li>' . t('Threaded <em>comments</em> submitted by users (for example, <em>You wash the potatoes first and then...</em>).') . '</li>';
- $output .= '<li>' . t('Optional <em>containers</em>, used to group similar forums. Forums can be placed inside containers, and vice versa.').'</li>';
+ $output .= '<li>' . t('Optional <em>containers</em>, used to group similar forums. Forums can be placed inside containers, and vice versa.') . '</li>';
$output .= '</ul>';
$output .= '</p>';
$output .= '<p>' . t('For more information, see the <a href=":forum">online documentation for the Forum module</a>.', array(':forum' => 'https://www.drupal.org/documentation/modules/forum')) . '</p>';
diff --git a/core/modules/history/history.module b/core/modules/history/history.module
index baaec2e..7792591 100644
--- a/core/modules/history/history.module
+++ b/core/modules/history/history.module
@@ -28,7 +28,7 @@ function history_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.history':
$output = '<h3>' . t('About') . '</h3>';
- $output .= '<p>' . t('The History module keeps track of which content a user has read. It marks content as <em>new</em> or <em>updated</em> depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered <em>read</em>. The History module does not have a user interface but it provides a filter to <a href=":views-help">Views</a> to show new or updated content. For more information, see the <a href=":url">online documentation for the History module</a>.', array(':views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array ('name' => 'views')) : '#', ':url' => 'https://www.drupal.org/documentation/modules/history')) . '</p>';
+ $output .= '<p>' . t('The History module keeps track of which content a user has read. It marks content as <em>new</em> or <em>updated</em> depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered <em>read</em>. The History module does not have a user interface but it provides a filter to <a href=":views-help">Views</a> to show new or updated content. For more information, see the <a href=":url">online documentation for the History module</a>.', array(':views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array ('name' => 'views')) : '#', ':url' => 'https://www.drupal.org/documentation/modules/history')) . '</p>';
return $output;
}
}
diff --git a/core/modules/image/src/Tests/ImageDimensionsTest.php b/core/modules/image/src/Tests/ImageDimensionsTest.php
index 74cc7bf..6f73042 100644
--- a/core/modules/image/src/Tests/ImageDimensionsTest.php
+++ b/core/modules/image/src/Tests/ImageDimensionsTest.php
@@ -35,7 +35,7 @@ class ImageDimensionsTest extends WebTestBase {
/** @var $style \Drupal\image\ImageStyleInterface */
$style = ImageStyle::create(array('name' => 'test', 'label' => 'Test'));
$style->save();
- $generated_uri = 'public://styles/test/public/'. \Drupal::service('file_system')->basename($original_uri);
+ $generated_uri = 'public://styles/test/public/' . \Drupal::service('file_system')->basename($original_uri);
$url = file_url_transform_relative($style->buildUrl($original_uri));
$variables = array(
@@ -248,7 +248,7 @@ class ImageDimensionsTest extends WebTestBase {
'#height' => 20,
];
// PNG original image. Should be resized to 100x100.
- $generated_uri = 'public://styles/test_uri/public/'. \Drupal::service('file_system')->basename($original_uri);
+ $generated_uri = 'public://styles/test_uri/public/' . \Drupal::service('file_system')->basename($original_uri);
$url = file_url_transform_relative($style->buildUrl($original_uri));
$this->assertEqual($this->getImageTag($variables), '<img src="' . $url . '" width="100" height="100" alt="" class="image-style-test-uri" />');
$this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
@@ -261,7 +261,7 @@ class ImageDimensionsTest extends WebTestBase {
// GIF original image. Should be resized to 50x50.
$file = $files[1];
$original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
- $generated_uri = 'public://styles/test_uri/public/'. \Drupal::service('file_system')->basename($original_uri);
+ $generated_uri = 'public://styles/test_uri/public/' . \Drupal::service('file_system')->basename($original_uri);
$url = file_url_transform_relative($style->buildUrl($original_uri));
$variables['#uri'] = $original_uri;
$this->assertEqual($this->getImageTag($variables), '<img src="' . $url . '" width="50" height="50" alt="" class="image-style-test-uri" />');
diff --git a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
index fc71e18..f146ccc 100644
--- a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
@@ -175,7 +175,7 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
// make sure that access is denied.
$file_noaccess = array_shift($files);
$original_uri_noaccess = file_unmanaged_copy($file_noaccess->uri, $scheme . '://', FILE_EXISTS_RENAME);
- $generated_uri_noaccess = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/'. drupal_basename($original_uri_noaccess);
+ $generated_uri_noaccess = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/' . drupal_basename($original_uri_noaccess);
$this->assertFalse(file_exists($generated_uri_noaccess), 'Generated file does not exist.');
$generate_url_noaccess = $this->style->buildUrl($original_uri_noaccess);
@@ -249,7 +249,7 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
// Check that requesting a nonexistent image does not create any new
// directories in the file system.
- $directory = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/' . $this->randomMachineName();
+ $directory = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/' . $this->randomMachineName();
$this->drupalGet(file_create_url($directory . '/' . $this->randomString()));
$this->assertFalse(file_exists($directory), 'New directory was not created in the filesystem when requesting an unauthorized image.');
}
diff --git a/core/modules/language/src/ConfigurableLanguageManager.php b/core/modules/language/src/ConfigurableLanguageManager.php
index 26892c3..238bd83 100644
--- a/core/modules/language/src/ConfigurableLanguageManager.php
+++ b/core/modules/language/src/ConfigurableLanguageManager.php
@@ -387,7 +387,7 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl
$type = 'language_fallback_candidates';
$types = array();
if (!empty($context['operation'])) {
- $types[] = $type . '_' . $context['operation'];
+ $types[] = $type . '_' . $context['operation'];
}
$types[] = $type;
$this->moduleHandler->alter($types, $candidates, $context);
diff --git a/core/modules/language/src/Tests/LanguageListTest.php b/core/modules/language/src/Tests/LanguageListTest.php
index 25de99c..2f1a455 100644
--- a/core/modules/language/src/Tests/LanguageListTest.php
+++ b/core/modules/language/src/Tests/LanguageListTest.php
@@ -61,7 +61,7 @@ class LanguageListTest extends WebTestBase {
);
$this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language'));
$this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE]));
- $this->assertRaw('"edit-languages-' . $langcode .'-weight"', 'Language code found.');
+ $this->assertRaw('"edit-languages-' . $langcode . '-weight"', 'Language code found.');
$this->assertText(t($name), 'Test language added.');
$language = \Drupal::service('language_manager')->getLanguage($langcode);
diff --git a/core/modules/language/src/Tests/LanguageNegotiationInfoTest.php b/core/modules/language/src/Tests/LanguageNegotiationInfoTest.php
index caafc80..ee4c6d4 100644
--- a/core/modules/language/src/Tests/LanguageNegotiationInfoTest.php
+++ b/core/modules/language/src/Tests/LanguageNegotiationInfoTest.php
@@ -86,7 +86,7 @@ class LanguageNegotiationInfoTest extends WebTestBase {
$test_type = 'test_language_type';
$interface_method_id = LanguageNegotiationUI::METHOD_ID;
$test_method_id = 'test_language_negotiation_method';
- $form_field = $type . '[enabled]['. $interface_method_id .']';
+ $form_field = $type . '[enabled][' . $interface_method_id . ']';
$edit = array(
$form_field => TRUE,
$type . '[enabled][' . $test_method_id . ']' => TRUE,
diff --git a/core/modules/locale/src/Form/ExportForm.php b/core/modules/locale/src/Form/ExportForm.php
index 1b19a93..ed2a6cf 100644
--- a/core/modules/locale/src/Form/ExportForm.php
+++ b/core/modules/locale/src/Form/ExportForm.php
@@ -139,7 +139,7 @@ class ExportForm extends FormBase {
$reader->setOptions($content_options);
$languages = $this->languageManager->getLanguages();
$language_name = isset($languages[$language->getId()]) ? $languages[$language->getId()]->getName() : '';
- $filename = $language->getId() .'.po';
+ $filename = $language->getId() . '.po';
}
else {
// Template required.
diff --git a/core/modules/locale/src/Tests/LocaleContentTest.php b/core/modules/locale/src/Tests/LocaleContentTest.php
index 51ab6b0..07021fa 100644
--- a/core/modules/locale/src/Tests/LocaleContentTest.php
+++ b/core/modules/locale/src/Tests/LocaleContentTest.php
@@ -112,7 +112,7 @@ class LocaleContentTest extends WebTestBase {
// Edit the content and ensure correct language is selected.
$path = 'node/' . $node->id() . '/edit';
$this->drupalGet($path);
- $this->assertRaw('<option value="' . $langcode . '" selected="selected">' . $name . '</option>', 'Correct language selected.');
+ $this->assertRaw('<option value="' . $langcode . '" selected="selected">' . $name . '</option>', 'Correct language selected.');
// Ensure we can change the node language.
$edit = array(
'langcode[0][value]' => 'en',
diff --git a/core/modules/menu_ui/src/Tests/MenuNodeTest.php b/core/modules/menu_ui/src/Tests/MenuNodeTest.php
index cdc0b12..ce47fb1 100644
--- a/core/modules/menu_ui/src/Tests/MenuNodeTest.php
+++ b/core/modules/menu_ui/src/Tests/MenuNodeTest.php
@@ -229,10 +229,10 @@ class MenuNodeTest extends WebTestBase {
));
$child_item->save();
// Edit the first node.
- $this->drupalGet('node/'. $node->id() .'/edit');
+ $this->drupalGet('node/' . $node->id() . '/edit');
// Assert that it is not possible to set the parent of the first node to itself or the second node.
- $this->assertNoOption('edit-menu-menu-parent', 'tools:'. $item->getPluginId());
- $this->assertNoOption('edit-menu-menu-parent', 'tools:'. $child_item->getPluginId());
+ $this->assertNoOption('edit-menu-menu-parent', 'tools:' . $item->getPluginId());
+ $this->assertNoOption('edit-menu-menu-parent', 'tools:' . $child_item->getPluginId());
// Assert that unallowed Administration menu is not available in options.
$this->assertNoOption('edit-menu-menu-parent', 'admin:');
}
diff --git a/core/modules/menu_ui/src/Tests/MenuTest.php b/core/modules/menu_ui/src/Tests/MenuTest.php
index 74c09af..f640cc7 100644
--- a/core/modules/menu_ui/src/Tests/MenuTest.php
+++ b/core/modules/menu_ui/src/Tests/MenuTest.php
@@ -571,7 +571,7 @@ class MenuTest extends MenuWebTestBase {
$id = 'block:block=' . $block->id() . ':langcode=en|menu:menu=' . $custom_menu->id() . ':langcode=en';
// @see \Drupal\contextual\Tests\ContextualDynamicContextTest:assertContextualLinkPlaceHolder()
- $this->assertRaw('<div data-contextual-id="'. $id . '"></div>', format_string('Contextual link placeholder with id @id exists.', array('@id' => $id)));
+ $this->assertRaw('<div data-contextual-id="' . $id . '"></div>', format_string('Contextual link placeholder with id @id exists.', array('@id' => $id)));
// Get server-rendered contextual links.
// @see \Drupal\contextual\Tests\ContextualDynamicContextTest:renderContextualLinks()
diff --git a/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php b/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php
index d11c657..7f44157 100644
--- a/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php
@@ -44,7 +44,7 @@ class MachineNameTest extends MigrateProcessTestCase {
// - Uppercase -> lowercase,
// - Multiple consecutive underscore -> single underscore.
$human_name_ascii = 'foo2, the.bar;2*&the%baz!YEE____HaW ';
- $human_name = $human_name_ascii .'áéő';
+ $human_name = $human_name_ascii . 'áéő';
$expected_result = 'foo2_the_bar_2_the_baz_yee_haw_aeo';
// Test for calling transliterate on mock object.
$this->transliteration
diff --git a/core/modules/node/src/Tests/NodeTitleTest.php b/core/modules/node/src/Tests/NodeTitleTest.php
index 93a02d8..ea53300 100644
--- a/core/modules/node/src/Tests/NodeTitleTest.php
+++ b/core/modules/node/src/Tests/NodeTitleTest.php
@@ -56,7 +56,7 @@ class NodeTitleTest extends NodeTestBase {
// Test <title> tag.
$this->drupalGet('node/' . $node->id());
$xpath = '//title';
- $this->assertEqual(current($this->xpath($xpath)), $node->label() .' | Drupal', 'Page title is equal to node title.', 'Node');
+ $this->assertEqual(current($this->xpath($xpath)), $node->label() . ' | Drupal', 'Page title is equal to node title.', 'Node');
// Test breadcrumb in comment preview.
$this->drupalGet('comment/reply/node/' . $node->id() . '/comment');
diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module
index ab1777e..00cff3b 100644
--- a/core/modules/node/tests/modules/node_test/node_test.module
+++ b/core/modules/node/tests/modules/node_test/node_test.module
@@ -170,7 +170,7 @@ function node_test_entity_view_mode_alter(&$view_mode, EntityInterface $entity,
function node_test_node_insert(NodeInterface $node) {
// Set the node title to the node ID and save.
if ($node->getTitle() == 'new') {
- $node->setTitle('Node '. $node->id());
+ $node->setTitle('Node ' . $node->id());
$node->setNewRevision(FALSE);
$node->save();
}
diff --git a/core/modules/page_cache/page_cache.module b/core/modules/page_cache/page_cache.module
index 96abbcb..3b8baf4 100644
--- a/core/modules/page_cache/page_cache.module
+++ b/core/modules/page_cache/page_cache.module
@@ -23,7 +23,7 @@ function page_cache_help($route_name, RouteMatchInterface $route_match) {
$output .= '<dd>' . t('Pages are usually identical for all anonymous users, while they can be personalized for each authenticated user. This is why entire pages can be cached for anonymous users, whereas they will have to be rebuilt for every authenticated user.') . '</dd>';
$output .= '<dd>' . t('To speed up your site for authenticated users, see the <a href=":dynamic_page_cache-help">Dynamic Page Cache module</a>.', [':dynamic_page_cache-help' => (\Drupal::moduleHandler()->moduleExists('dynamic_page_cache')) ? Url::fromRoute('help.page', ['name' => 'dynamic_page_cache'])->toString() : '#']) . '</p>';
$output .= '<dt>' . t('Configuring the internal page cache') . '</dt>';
- $output .= '<dd>' . t('On the <a href=":cache-settings">Performance page</a>, you can configure how long browsers and proxies may cache pages; that setting is also respected by the Internal Page Cache module. There is no other configuration.', array(':cache-settings' => \Drupal::url('system.performance_settings'))) . '</dd>';
+ $output .= '<dd>' . t('On the <a href=":cache-settings">Performance page</a>, you can configure how long browsers and proxies may cache pages; that setting is also respected by the Internal Page Cache module. There is no other configuration.', array(':cache-settings' => \Drupal::url('system.performance_settings'))) . '</dd>';
$output .= '</dl>';
return $output;
diff --git a/core/modules/path/src/Tests/PathAliasTest.php b/core/modules/path/src/Tests/PathAliasTest.php
index e6b1738..449a0ae 100644
--- a/core/modules/path/src/Tests/PathAliasTest.php
+++ b/core/modules/path/src/Tests/PathAliasTest.php
@@ -59,7 +59,7 @@ class PathAliasTest extends PathTestBase {
// @todo Remove this once https://www.drupal.org/node/2480077 lands.
Cache::invalidateTags(['rendered']);
$this->drupalGet(trim($edit['alias'], '/'));
- $this->assertTrue(\Drupal::cache('data')->get('preload-paths:' . $edit['source']), 'Cache entry was created.');
+ $this->assertTrue(\Drupal::cache('data')->get('preload-paths:' . $edit['source']), 'Cache entry was created.');
}
/**
diff --git a/core/modules/quickedit/src/Tests/QuickEditAutocompleteTermTest.php b/core/modules/quickedit/src/Tests/QuickEditAutocompleteTermTest.php
index a88490a..aa46a77 100644
--- a/core/modules/quickedit/src/Tests/QuickEditAutocompleteTermTest.php
+++ b/core/modules/quickedit/src/Tests/QuickEditAutocompleteTermTest.php
@@ -128,7 +128,7 @@ class QuickEditAutocompleteTermTest extends WebTestBase {
public function testAutocompleteQuickEdit() {
$this->drupalLogin($this->editorUser);
- $quickedit_uri = 'quickedit/form/node/'. $this->node->id() . '/' . $this->fieldName . '/' . $this->node->language()->getId() . '/full';
+ $quickedit_uri = 'quickedit/form/node/' . $this->node->id() . '/' . $this->fieldName . '/' . $this->node->language()->getId() . '/full';
$post = array('nocssjs' => 'true') + $this->getAjaxPageStatePostData();
$response = $this->drupalPost($quickedit_uri, 'application/vnd.drupal-ajax', $post);
$ajax_commands = Json::decode($response);
@@ -159,7 +159,7 @@ class QuickEditAutocompleteTermTest extends WebTestBase {
// Load the form again, which should now get it back from
// PrivateTempStore.
- $quickedit_uri = 'quickedit/form/node/'. $this->node->id() . '/' . $this->fieldName . '/' . $this->node->language()->getId() . '/full';
+ $quickedit_uri = 'quickedit/form/node/' . $this->node->id() . '/' . $this->fieldName . '/' . $this->node->language()->getId() . '/full';
$post = array('nocssjs' => 'true') + $this->getAjaxPageStatePostData();
$response = $this->drupalPost($quickedit_uri, 'application/vnd.drupal-ajax', $post);
$ajax_commands = Json::decode($response);
diff --git a/core/modules/rest/src/Tests/UpdateTest.php b/core/modules/rest/src/Tests/UpdateTest.php
index 7cb5fc6..e90da82 100644
--- a/core/modules/rest/src/Tests/UpdateTest.php
+++ b/core/modules/rest/src/Tests/UpdateTest.php
@@ -69,7 +69,7 @@ class UpdateTest extends RESTTestBase {
$this->assertResponse(204);
$entity = entity_load($entity_type, $entity->id(), TRUE);
- $this->assertNotNull($entity->field_test_text->value. 'Test field has not been deleted.');
+ $this->assertNotNull($entity->field_test_text->value . 'Test field has not been deleted.');
// Try to empty a field.
$normalized['field_test_text'] = array();
diff --git a/core/modules/search/src/SearchQuery.php b/core/modules/search/src/SearchQuery.php
index 13db850..2ca2bda 100644
--- a/core/modules/search/src/SearchQuery.php
+++ b/core/modules/search/src/SearchQuery.php
@@ -224,7 +224,7 @@ class SearchQuery extends SelectExtender {
protected function parseSearchExpression() {
// Matches words optionally prefixed by a - sign. A word in this case is
// something between two spaces, optionally quoted.
- preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->searchExpression, $keywords, PREG_SET_ORDER);
+ preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->searchExpression, $keywords, PREG_SET_ORDER);
if (count($keywords) == 0) {
return;
diff --git a/core/modules/search/src/Tests/SearchCommentTest.php b/core/modules/search/src/Tests/SearchCommentTest.php
index acce26e..1af1194 100644
--- a/core/modules/search/src/Tests/SearchCommentTest.php
+++ b/core/modules/search/src/Tests/SearchCommentTest.php
@@ -120,7 +120,7 @@ class SearchCommentTest extends SearchTestBase {
$edit_comment['comment_body[0][value]'] = '<h1>' . $comment_body . '</h1>';
$full_html_format_id = 'full_html';
$edit_comment['comment_body[0][format]'] = $full_html_format_id;
- $this->drupalPostForm('comment/reply/node/' . $node->id() .'/comment', $edit_comment, t('Save'));
+ $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $edit_comment, t('Save'));
// Post a comment with an evil script tag in the comment subject and a
// script tag nearby a keyword in the comment body. Use the 'FULL HTML' text
diff --git a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php
index 7ec9e19..89ed6d2 100644
--- a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php
+++ b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php
@@ -86,8 +86,8 @@ class SimpleTestBrowserTest extends WebTestBase {
$this->drupalLogout();
$system_path = $base_url . '/' . drupal_get_path('module', 'system');
- $HTTP_path = $system_path .'/tests/http.php/user/login';
- $https_path = $system_path .'/tests/https.php/user/login';
+ $HTTP_path = $system_path . '/tests/http.php/user/login';
+ $https_path = $system_path . '/tests/https.php/user/login';
// Generate a valid simpletest User-Agent to pass validation.
$this->assertTrue(preg_match('/simpletest\d+/', $this->databasePrefix, $matches), 'Database prefix contains simpletest prefix.');
$test_ua = drupal_generate_test_ua($matches[0]);
diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php
index 792741e..290403b 100644
--- a/core/modules/simpletest/src/Tests/SimpleTestTest.php
+++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php
@@ -78,7 +78,7 @@ if (!function_exists('simpletest_test_stub_settings_function')) {
}
EOD;
- file_put_contents($this->siteDirectory. '/' . 'settings.testing.php', $php);
+ file_put_contents($this->siteDirectory . '/' . 'settings.testing.php', $php);
// @see \Drupal\system\Tests\DrupalKernel\DrupalKernelSiteTest
$class = __CLASS__;
$yaml = <<<EOD
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 668e1b5..35d2324 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -625,7 +625,7 @@ abstract class WebTestBase extends TestBase {
copy($settings_testing_file, $directory . '/settings.testing.php');
// Add the name of the testing class to settings.php and include the
// testing specific overrides
- file_put_contents($directory . '/settings.php', "\n\$test_class = '" . get_class($this) ."';\n" . 'include DRUPAL_ROOT . \'/\' . $site_path . \'/settings.testing.php\';' ."\n", FILE_APPEND);
+ file_put_contents($directory . '/settings.php', "\n\$test_class = '" . get_class($this) . "';\n" . 'include DRUPAL_ROOT . \'/\' . $site_path . \'/settings.testing.php\';' . "\n", FILE_APPEND);
}
$settings_services_file = DRUPAL_ROOT . '/' . $this->originalSite . '/testing.services.yml';
if (!file_exists($settings_services_file)) {
diff --git a/core/modules/simpletest/tests/src/Unit/SimpletestPhpunitRunCommandTest.php b/core/modules/simpletest/tests/src/Unit/SimpletestPhpunitRunCommandTest.php
index 4a3d252..2afea1c 100644
--- a/core/modules/simpletest/tests/src/Unit/SimpletestPhpunitRunCommandTest.php
+++ b/core/modules/simpletest/tests/src/Unit/SimpletestPhpunitRunCommandTest.php
@@ -16,7 +16,7 @@ use Drupal\Tests\UnitTestCase;
class SimpletestPhpunitRunCommandTest extends UnitTestCase {
function testSimpletestPhpUnitRunCommand() {
- include_once __DIR__ .'/../../fixtures/simpletest_phpunit_run_command_test.php';
+ include_once __DIR__ . '/../../fixtures/simpletest_phpunit_run_command_test.php';
$app_root = __DIR__ . '/../../../../../..';
include_once "$app_root/core/modules/simpletest/simpletest.module";
$container = new ContainerBuilder();
diff --git a/core/modules/statistics/src/Tests/StatisticsAdminTest.php b/core/modules/statistics/src/Tests/StatisticsAdminTest.php
index d420085..ad573c1 100644
--- a/core/modules/statistics/src/Tests/StatisticsAdminTest.php
+++ b/core/modules/statistics/src/Tests/StatisticsAdminTest.php
@@ -75,7 +75,7 @@ class StatisticsAdminTest extends WebTestBase {
$nid = $this->testNode->id();
$post = array('nid' => $nid);
global $base_url;
- $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
+ $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics') . '/statistics.php';
$this->client->post($stats_path, array('form_params' => $post));
// Hit the node again (the counter is incremented after the hit, so
@@ -110,7 +110,7 @@ class StatisticsAdminTest extends WebTestBase {
$nid = $this->testNode->id();
$post = array('nid' => $nid);
global $base_url;
- $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
+ $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics') . '/statistics.php';
$this->client->post($stats_path, array('form_params' => $post));
$result = db_select('node_counter', 'n')
@@ -144,7 +144,7 @@ class StatisticsAdminTest extends WebTestBase {
$nid = $this->testNode->id();
$post = array('nid' => $nid);
global $base_url;
- $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
+ $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics') . '/statistics.php';
$this->client->post($stats_path, array('form_params' => $post));
$this->drupalGet('node/' . $this->testNode->id());
$this->client->post($stats_path, array('form_params' => $post));
diff --git a/core/modules/statistics/src/Tests/StatisticsReportsTest.php b/core/modules/statistics/src/Tests/StatisticsReportsTest.php
index a4ae66b..9c0d26c 100644
--- a/core/modules/statistics/src/Tests/StatisticsReportsTest.php
+++ b/core/modules/statistics/src/Tests/StatisticsReportsTest.php
@@ -24,7 +24,7 @@ class StatisticsReportsTest extends StatisticsTestBase {
$post = http_build_query(array('nid' => $nid));
$headers = array('Content-Type' => 'application/x-www-form-urlencoded');
global $base_url;
- $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
+ $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics') . '/statistics.php';
$client = \Drupal::service('http_client_factory')
->fromOptions(['config/curl' => [CURLOPT_TIMEOUT => 10]]);
$client->post($stats_path, array('headers' => $headers, 'body' => $post));
diff --git a/core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php b/core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php
index 016883e..bf35de3 100644
--- a/core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php
+++ b/core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php
@@ -27,7 +27,7 @@ class StatisticsTokenReplaceTest extends StatisticsTestBase {
$post = http_build_query(array('nid' => $nid));
$headers = array('Content-Type' => 'application/x-www-form-urlencoded');
global $base_url;
- $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
+ $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics') . '/statistics.php';
$client = \Drupal::service('http_client_factory')
->fromOptions(['config/curl' => [CURLOPT_TIMEOUT => 10]]);
$client->post($stats_path, array('headers' => $headers, 'body' => $post));
diff --git a/core/modules/statistics/src/Tests/Views/IntegrationTest.php b/core/modules/statistics/src/Tests/Views/IntegrationTest.php
index 6435818..4882fd2 100644
--- a/core/modules/statistics/src/Tests/Views/IntegrationTest.php
+++ b/core/modules/statistics/src/Tests/Views/IntegrationTest.php
@@ -70,7 +70,7 @@ class IntegrationTest extends ViewTestBase {
// Manually calling statistics.php, simulating ajax behavior.
// @see \Drupal\statistics\Tests\StatisticsLoggingTest::testLogging().
global $base_url;
- $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
+ $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics') . '/statistics.php';
$client = \Drupal::service('http_client_factory')->fromOptions(['config/curl', array(CURLOPT_TIMEOUT => 10)]);
$client->post($stats_path, array('form_params' => array('nid' => $this->node->id())));
$this->drupalGet('test_statistics_integration');
diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php
index cc1914c..f378631 100644
--- a/core/modules/system/src/Controller/DbUpdateController.php
+++ b/core/modules/system/src/Controller/DbUpdateController.php
@@ -422,7 +422,7 @@ class DbUpdateController extends ControllerBase {
}
if (Settings::get('update_free_access')) {
- $message .= '<p>' . $this->t("<strong>Reminder: don't forget to set the <code>\$settings['update_free_access']</code> value in your <code>settings.php</code> file back to <code>FALSE</code>.</strong>") . '</p>';
+ $message .= '<p>' . $this->t("<strong>Reminder: don't forget to set the <code>\$settings['update_free_access']</code> value in your <code>settings.php</code> file back to <code>FALSE</code>.</strong>") . '</p>';
}
$build['message'] = array(
diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php
index 94fc371..7831c38 100644
--- a/core/modules/system/src/Form/ModulesListForm.php
+++ b/core/modules/system/src/Form/ModulesListForm.php
@@ -259,7 +259,7 @@ class ModulesListForm extends FormBase {
if (!empty($module->info['required'])) {
// Used when displaying modules that are required by the installation profile
$row['enable']['#disabled'] = TRUE;
- $row['#required_by'][] = $distribution . (!empty($module->info['explanation']) ? ' ('. $module->info['explanation'] .')' : '');
+ $row['#required_by'][] = $distribution . (!empty($module->info['explanation']) ? ' (' . $module->info['explanation'] . ')' : '');
}
// Check the compatibilities.
diff --git a/core/modules/system/src/Tests/Batch/ProcessingTest.php b/core/modules/system/src/Tests/Batch/ProcessingTest.php
index 17e087c..c85890d 100644
--- a/core/modules/system/src/Tests/Batch/ProcessingTest.php
+++ b/core/modules/system/src/Tests/Batch/ProcessingTest.php
@@ -181,7 +181,7 @@ class ProcessingTest extends WebTestBase {
* TRUE on pass, FALSE on fail.
*/
function assertBatchMessages($texts, $message) {
- $pattern = '|' . implode('.*', $texts) .'|s';
+ $pattern = '|' . implode('.*', $texts) . '|s';
return $this->assertPattern($pattern, $message);
}
diff --git a/core/modules/system/src/Tests/File/StreamWrapperTest.php b/core/modules/system/src/Tests/File/StreamWrapperTest.php
index 4a70c01..2d83627 100644
--- a/core/modules/system/src/Tests/File/StreamWrapperTest.php
+++ b/core/modules/system/src/Tests/File/StreamWrapperTest.php
@@ -107,7 +107,7 @@ class StreamWrapperTest extends FileTestBase {
* Test some file handle functions.
*/
function testFileFunctions() {
- $filename = 'public://'. $this->randomMachineName();
+ $filename = 'public://' . $this->randomMachineName();
file_put_contents($filename, str_repeat('d', 1000));
// Open for rw and place pointer at beginning of file so select will return.
diff --git a/core/modules/system/src/Tests/Image/ToolkitGdTest.php b/core/modules/system/src/Tests/Image/ToolkitGdTest.php
index 688909a..cb87374 100644
--- a/core/modules/system/src/Tests/Image/ToolkitGdTest.php
+++ b/core/modules/system/src/Tests/Image/ToolkitGdTest.php
@@ -248,7 +248,7 @@ class ToolkitGdTest extends KernelTestBase {
}
// Prepare a directory for test file results.
- $directory = $this->publicFilesDirectory .'/imagetest';
+ $directory = $this->publicFilesDirectory . '/imagetest';
file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
foreach ($files as $file) {
@@ -424,7 +424,7 @@ class ToolkitGdTest extends KernelTestBase {
*/
function testGifTransparentImages() {
// Prepare a directory for test file results.
- $directory = $this->publicFilesDirectory .'/imagetest';
+ $directory = $this->publicFilesDirectory . '/imagetest';
file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
// Test loading an indexed GIF image with transparent color set.
diff --git a/core/modules/system/src/Tests/Module/ModuleTestBase.php b/core/modules/system/src/Tests/Module/ModuleTestBase.php
index f0ea3fb..d9194d1 100644
--- a/core/modules/system/src/Tests/Module/ModuleTestBase.php
+++ b/core/modules/system/src/Tests/Module/ModuleTestBase.php
@@ -91,7 +91,7 @@ abstract class ModuleTestBase extends WebTestBase {
* TRUE if configuration has been installed, FALSE otherwise.
*/
function assertModuleConfig($module) {
- $module_config_dir = drupal_get_path('module', $module) . '/'. InstallStorage::CONFIG_INSTALL_DIRECTORY;
+ $module_config_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
if (!is_dir($module_config_dir)) {
return;
}
diff --git a/core/modules/system/src/Tests/ParamConverter/UpcastingTest.php b/core/modules/system/src/Tests/ParamConverter/UpcastingTest.php
index 8e91b97..b881386 100644
--- a/core/modules/system/src/Tests/ParamConverter/UpcastingTest.php
+++ b/core/modules/system/src/Tests/ParamConverter/UpcastingTest.php
@@ -30,7 +30,7 @@ class UpcastingTest extends WebTestBase {
$foo = 'bar';
// paramconverter_test/test_user_node_foo/{user}/{node}/{foo}
- $this->drupalGet("paramconverter_test/test_user_node_foo/" . $user->id() . '/' . $node->id() . "/$foo");
+ $this->drupalGet("paramconverter_test/test_user_node_foo/" . $user->id() . '/' . $node->id() . "/$foo");
$this->assertRaw("user: {$user->label()}, node: {$node->label()}, foo: $foo", 'user and node upcast by entity name');
// paramconverter_test/test_node_user_user/{node}/{foo}/{user}
diff --git a/core/modules/system/src/Tests/System/IndexPhpTest.php b/core/modules/system/src/Tests/System/IndexPhpTest.php
index b600c5c..55c6253 100644
--- a/core/modules/system/src/Tests/System/IndexPhpTest.php
+++ b/core/modules/system/src/Tests/System/IndexPhpTest.php
@@ -23,7 +23,7 @@ class IndexPhpTest extends WebTestBase {
$this->drupalGet($index_php, array('external' => TRUE));
$this->assertResponse(200, 'Make sure index.php returns a valid page.');
- $this->drupalGet($index_php .'/user', array('external' => TRUE));
+ $this->drupalGet($index_php . '/user', array('external' => TRUE));
$this->assertResponse(200, 'Make sure index.php/user returns a valid page.');
}
}
diff --git a/core/modules/system/src/Tests/System/SiteMaintenanceTest.php b/core/modules/system/src/Tests/System/SiteMaintenanceTest.php
index 52f53e9..f1d75c0 100644
--- a/core/modules/system/src/Tests/System/SiteMaintenanceTest.php
+++ b/core/modules/system/src/Tests/System/SiteMaintenanceTest.php
@@ -114,7 +114,7 @@ class SiteMaintenanceTest extends WebTestBase {
);
$this->drupalPostForm('user/password', $edit, t('Submit'));
$mails = $this->drupalGetMails();
- $start = strpos($mails[0]['body'], 'user/reset/'. $this->user->id());
+ $start = strpos($mails[0]['body'], 'user/reset/' . $this->user->id());
$path = substr($mails[0]['body'], $start, 66 + strlen($this->user->id()));
// Log in with temporary login link.
diff --git a/core/modules/system/src/Tests/Theme/FunctionsTest.php b/core/modules/system/src/Tests/Theme/FunctionsTest.php
index 61be40b..fa5a2ac 100644
--- a/core/modules/system/src/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/src/Tests/Theme/FunctionsTest.php
@@ -278,7 +278,7 @@ class FunctionsTest extends WebTestBase {
$expected_links .= '<li data-drupal-link-system-path="router_test/test1" class="router-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1') . '" data-drupal-link-system-path="router_test/test1">' . Html::escape('Test route') . '</a></li>';
$query = array('key' => 'value');
$encoded_query = Html::escape(Json::encode($query));
- $expected_links .= '<li data-drupal-link-query="'.$encoded_query.'" data-drupal-link-system-path="router_test/test1" class="query-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '" data-drupal-link-query="'.$encoded_query.'" data-drupal-link-system-path="router_test/test1">' . Html::escape('Query test route') . '</a></li>';
+ $expected_links .= '<li data-drupal-link-query="' . $encoded_query . '" data-drupal-link-system-path="router_test/test1" class="query-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '" data-drupal-link-query="' . $encoded_query . '" data-drupal-link-system-path="router_test/test1">' . Html::escape('Query test route') . '</a></li>';
$expected_links .= '</ul>';
$expected = $expected_heading . $expected_links;
$this->assertThemeOutput('links', $variables, $expected);
diff --git a/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php b/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php
index 96aea22..1783be6 100644
--- a/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php
+++ b/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php
@@ -47,7 +47,7 @@ class TwigDebugMarkupTest extends WebTestBase {
$this->assertTrue(strpos($output, '<!-- THEME DEBUG -->') !== FALSE, 'Twig debug markup found in theme output when debug is enabled.');
$this->setRawContent($output);
$this->assertTrue(strpos($output, "THEME HOOK: 'node'") !== FALSE, 'Theme call information found.');
- $this->assertTrue(strpos($output, '* node--1--full' . $extension . PHP_EOL . ' x node--1' . $extension . PHP_EOL . ' * node--page--full' . $extension . PHP_EOL . ' * node--page' . $extension . PHP_EOL . ' * node--full' . $extension . PHP_EOL . ' * node' . $extension) !== FALSE, 'Suggested template files found in order and node ID specific template shown as current template.');
+ $this->assertTrue(strpos($output, '* node--1--full' . $extension . PHP_EOL . ' x node--1' . $extension . PHP_EOL . ' * node--page--full' . $extension . PHP_EOL . ' * node--page' . $extension . PHP_EOL . ' * node--full' . $extension . PHP_EOL . ' * node' . $extension) !== FALSE, 'Suggested template files found in order and node ID specific template shown as current template.');
$this->assertEscaped('node--<script type="text/javascript">alert(\'yo\');</script>');
$template_filename = $templates['node__1']['path'] . '/' . $templates['node__1']['template'] . $extension;
$this->assertTrue(strpos($output, "BEGIN OUTPUT from '$template_filename'") !== FALSE, 'Full path to current template file found.');
@@ -57,7 +57,7 @@ class TwigDebugMarkupTest extends WebTestBase {
$node2 = $this->drupalCreateNode();
$build = node_view($node2);
$output = $renderer->renderRoot($build);
- $this->assertTrue(strpos($output, '* node--2--full' . $extension . PHP_EOL . ' * node--2' . $extension . PHP_EOL . ' * node--page--full' . $extension . PHP_EOL . ' * node--page' . $extension . PHP_EOL . ' * node--full' . $extension . PHP_EOL . ' x node' . $extension) !== FALSE, 'Suggested template files found in order and base template shown as current template.');
+ $this->assertTrue(strpos($output, '* node--2--full' . $extension . PHP_EOL . ' * node--2' . $extension . PHP_EOL . ' * node--page--full' . $extension . PHP_EOL . ' * node--page' . $extension . PHP_EOL . ' * node--full' . $extension . PHP_EOL . ' x node' . $extension) !== FALSE, 'Suggested template files found in order and base template shown as current template.');
// Create another node and make sure the template suggestions shown in the
// debug markup are correct.
diff --git a/core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc b/core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc
index 026c8a7..4a271b0 100644
--- a/core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc
+++ b/core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc
@@ -90,7 +90,7 @@ function _batch_test_nested_batch_callback() {
function _batch_test_finished_helper($batch_id, $success, $results, $operations) {
if ($results) {
foreach ($results as $op => $op_results) {
- $messages[] = 'op '. Html::escape($op) . ': processed ' . count($op_results) . ' elements';
+ $messages[] = 'op ' . Html::escape($op) . ': processed ' . count($op_results) . ' elements';
}
}
else {
diff --git a/core/modules/system/tests/modules/batch_test/batch_test.module b/core/modules/system/tests/modules/batch_test/batch_test.module
index d4bbcc7..e7a8de6 100644
--- a/core/modules/system/tests/modules/batch_test/batch_test.module
+++ b/core/modules/system/tests/modules/batch_test/batch_test.module
@@ -23,7 +23,7 @@ function _batch_test_batch_0() {
$batch = array(
'operations' => array(),
'finished' => '_batch_test_finished_0',
- 'file' => drupal_get_path('module', 'batch_test'). '/batch_test.callbacks.inc',
+ 'file' => drupal_get_path('module', 'batch_test') . '/batch_test.callbacks.inc',
);
return $batch;
}
@@ -45,7 +45,7 @@ function _batch_test_batch_1() {
$batch = array(
'operations' => $operations,
'finished' => '_batch_test_finished_1',
- 'file' => drupal_get_path('module', 'batch_test'). '/batch_test.callbacks.inc',
+ 'file' => drupal_get_path('module', 'batch_test') . '/batch_test.callbacks.inc',
);
return $batch;
}
@@ -148,7 +148,7 @@ function _batch_test_batch_5() {
$batch = array(
'operations' => $operations,
'finished' => '_batch_test_finished_5',
- 'file' => drupal_get_path('module', 'batch_test'). '/batch_test.callbacks.inc',
+ 'file' => drupal_get_path('module', 'batch_test') . '/batch_test.callbacks.inc',
);
return $batch;
}
diff --git a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php b/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
index ccdccb5..306e160 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
@@ -75,7 +75,7 @@ class TaxonomyImageTest extends TaxonomyTestBase {
$image = array_pop($files);
$edit['name[0][value]'] = $this->randomMachineName();
$edit['files[field_test_0]'] = drupal_realpath($image->uri);
- $this->drupalPostForm('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/add', $edit, t('Save'));
+ $this->drupalPostForm('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/add', $edit, t('Save'));
$this->drupalPostForm(NULL, ['field_test[0][alt]' => $this->randomMachineName()], t('Save'));
$terms = entity_load_multiple_by_properties('taxonomy_term', array('name' => $edit['name[0][value]']));
$term = reset($terms);
diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php
index fa206e8..603da1f 100644
--- a/core/modules/taxonomy/src/Tests/TermTest.php
+++ b/core/modules/taxonomy/src/Tests/TermTest.php
@@ -225,10 +225,10 @@ class TermTest extends TaxonomyTestBase {
// three letters.
// @see https://www.drupal.org/node/2397691
$terms = array(
- 'term1' => 'a'. $this->randomMachineName(),
- 'term2' => 'b'. $this->randomMachineName(),
- 'term3' => 'c'. $this->randomMachineName() . ', ' . $this->randomMachineName(),
- 'term4' => 'd'. $this->randomMachineName(),
+ 'term1' => 'a' . $this->randomMachineName(),
+ 'term2' => 'b' . $this->randomMachineName(),
+ 'term3' => 'c' . $this->randomMachineName() . ', ' . $this->randomMachineName(),
+ 'term4' => 'd' . $this->randomMachineName(),
);
$edit = array();
diff --git a/core/modules/taxonomy/src/Tests/TermTranslationUITest.php b/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
index e59f7ac..a396544 100644
--- a/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
+++ b/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
@@ -124,7 +124,7 @@ class TermTranslationUITest extends ContentTranslationUITestBase {
$untranslatable_tid = $this->createEntity($values, $this->langcodes[0], $untranslatable_vocabulary->id());
// Verify translation links.
- $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview');
+ $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview');
$this->assertResponse(200, 'The translatable vocabulary page was found.');
$this->assertLinkByHref('term/' . $translatable_tid . '/translations', 0, 'The translations link exists for a translatable vocabulary.');
$this->assertLinkByHref('term/' . $translatable_tid . '/edit', 0, 'The edit link exists for a translatable vocabulary.');
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyDefaultArgumentTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyDefaultArgumentTest.php
index 3e633d8..a0105f5 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyDefaultArgumentTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyDefaultArgumentTest.php
@@ -60,7 +60,7 @@ class TaxonomyDefaultArgumentTest extends TaxonomyTestBase {
*/
public function testTermTitleEscaping() {
$this->term1->setName('<em>Markup</em>')->save();
- $this->drupalGet('taxonomy_default_argument_test/'. $this->term1->id());
+ $this->drupalGet('taxonomy_default_argument_test/' . $this->term1->id());
$this->assertEscaped($this->term1->label());
}
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldAllTermsTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldAllTermsTest.php
index 4c7222e..4737b98 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldAllTermsTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldAllTermsTest.php
@@ -61,7 +61,7 @@ class TaxonomyFieldAllTermsTest extends TaxonomyTestBase {
// The name for the vocabulary the term belongs to: {{ term_node_tid__vocabulary }}
$vocabulary = Vocabulary::load($this->term1->bundle());
- $this->assertText('The name for the vocabulary the term belongs to: ' . $vocabulary->label());
+ $this->assertText('The name for the vocabulary the term belongs to: ' . $vocabulary->label());
}
}
diff --git a/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php b/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php
index 8e4482f..4a6b46a 100644
--- a/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php
+++ b/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php
@@ -267,7 +267,7 @@ class ToolbarAdminMenuTest extends WebTestBase {
t($name, array(), array('langcode' => $langcode));
// Reset locale cache.
$this->container->get('string_translation')->reset();
- $this->assertRaw('"edit-languages-' . $langcode .'-weight"', 'Language code found.');
+ $this->assertRaw('"edit-languages-' . $langcode . '-weight"', 'Language code found.');
$this->assertText(t($name), 'Test language added.');
// Have the adminUser request a page in the new language.
diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php
index 4c8bdef..46603cc 100644
--- a/core/modules/user/src/AccountForm.php
+++ b/core/modules/user/src/AccountForm.php
@@ -387,8 +387,8 @@ abstract class AccountForm extends ContentEntityForm {
$user = $this->getEntity($form_state);
// If there's a session set to the users id, remove the password reset tag
// since a new password was saved.
- if (isset($_SESSION['pass_reset_'. $user->id()])) {
- unset($_SESSION['pass_reset_'. $user->id()]);
+ if (isset($_SESSION['pass_reset_' . $user->id()])) {
+ unset($_SESSION['pass_reset_' . $user->id()]);
}
}
}
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php b/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php
index c389191..104f7de 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php
@@ -31,15 +31,24 @@ class UserNameConstraintValidator extends ConstraintValidator {
}
if (preg_match('/[^\x{80}-\x{F7} a-z0-9@_.\'-]/i', $name)
|| preg_match(
- '/[\x{80}-\x{A0}' . // Non-printable ISO-8859-1 + NBSP
- '\x{AD}' . // Soft-hyphen
- '\x{2000}-\x{200F}' . // Various space characters
- '\x{2028}-\x{202F}' . // Bidirectional text overrides
- '\x{205F}-\x{206F}' . // Various text hinting characters
- '\x{FEFF}' . // Byte order mark
- '\x{FF01}-\x{FF60}' . // Full-width latin
- '\x{FFF9}-\x{FFFD}' . // Replacement characters
- '\x{0}-\x{1F}]/u', // NULL byte and control characters
+ // Non-printable ISO-8859-1 + NBSP
+ '/[\x{80}-\x{A0}' .
+ // Soft-hyphen
+ '\x{AD}' .
+ // Various space characters
+ '\x{2000}-\x{200F}' .
+ // Bidirectional text overrides
+ '\x{2028}-\x{202F}' .
+ // Various text hinting characters
+ '\x{205F}-\x{206F}' .
+ // Byte order mark
+ '\x{FEFF}' .
+ // Full-width latin
+ '\x{FF01}-\x{FF60}' .
+ // Replacement characters
+ '\x{FFF9}-\x{FFFD}' .
+ // NULL byte and control characters
+ '\x{0}-\x{1F}]/u',
$name)
) {
$this->context->addViolation($constraint->illegalMessage);
diff --git a/core/modules/views/src/Plugin/views/argument/Formula.php b/core/modules/views/src/Plugin/views/argument/Formula.php
index 1cd02d0..951d3ae 100644
--- a/core/modules/views/src/Plugin/views/argument/Formula.php
+++ b/core/modules/views/src/Plugin/views/argument/Formula.php
@@ -58,7 +58,7 @@ class Formula extends ArgumentPluginBase {
$this->ensureMyTable();
// Now that our table is secure, get our formula.
$placeholder = $this->placeholder();
- $formula = $this->getFormula() .' = ' . $placeholder;
+ $formula = $this->getFormula() . ' = ' . $placeholder;
$placeholders = array(
$placeholder => $this->argument,
);
diff --git a/core/modules/views/src/Plugin/views/cache/Time.php b/core/modules/views/src/Plugin/views/cache/Time.php
index 8a7ec86..601fbac 100644
--- a/core/modules/views/src/Plugin/views/cache/Time.php
+++ b/core/modules/views/src/Plugin/views/cache/Time.php
@@ -137,7 +137,7 @@ class Time extends CachePluginBase {
foreach ($custom_fields as $field) {
$cache_options = $form_state->getValue('cache_options');
if ($cache_options[$field] == 'custom' && !is_numeric($cache_options[$field . '_custom'])) {
- $form_state->setError($form[$field .'_custom'], $this->t('Custom time values must be numeric.'));
+ $form_state->setError($form[$field . '_custom'], $this->t('Custom time values must be numeric.'));
}
}
}
diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
index a4bfd59..2f7d29d 100644
--- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
@@ -1717,13 +1717,13 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
$display = $this->view->display_handler->display;
if (!empty($display)) {
- $themes[] = $hook . '__' . $this->view->storage->id() . '__' . $display['id'] . '__' . $this->options['id'];
- $themes[] = $hook . '__' . $this->view->storage->id() . '__' . $display['id'];
+ $themes[] = $hook . '__' . $this->view->storage->id() . '__' . $display['id'] . '__' . $this->options['id'];
+ $themes[] = $hook . '__' . $this->view->storage->id() . '__' . $display['id'];
$themes[] = $hook . '__' . $display['id'] . '__' . $this->options['id'];
$themes[] = $hook . '__' . $display['id'];
if ($display['id'] != $display['display_plugin']) {
- $themes[] = $hook . '__' . $this->view->storage->id() . '__' . $display['display_plugin'] . '__' . $this->options['id'];
- $themes[] = $hook . '__' . $this->view->storage->id() . '__' . $display['display_plugin'];
+ $themes[] = $hook . '__' . $this->view->storage->id() . '__' . $display['display_plugin'] . '__' . $this->options['id'];
+ $themes[] = $hook . '__' . $this->view->storage->id() . '__' . $display['display_plugin'];
$themes[] = $hook . '__' . $display['display_plugin'] . '__' . $this->options['id'];
$themes[] = $hook . '__' . $display['display_plugin'];
}
diff --git a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
index 004e4e8..dc23a68 100644
--- a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
+++ b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
@@ -203,8 +203,8 @@ class GroupwiseMax extends RelationshipPluginBase {
}
// Get the namespace string.
- $temp_view->namespace = (!empty($options['subquery_namespace'])) ? '_'. $options['subquery_namespace'] : '_INNER';
- $this->subquery_namespace = (!empty($options['subquery_namespace'])) ? '_'. $options['subquery_namespace'] : 'INNER';
+ $temp_view->namespace = (!empty($options['subquery_namespace'])) ? '_' . $options['subquery_namespace'] : '_INNER';
+ $this->subquery_namespace = (!empty($options['subquery_namespace'])) ? '_' . $options['subquery_namespace'] : 'INNER';
// The value we add here does nothing, but doing this adds the right tables
// and puts in a WHERE clause with a placeholder we can grab later.
diff --git a/core/modules/views/src/Tests/Handler/AreaTest.php b/core/modules/views/src/Tests/Handler/AreaTest.php
index f1e75bb..454ab58 100644
--- a/core/modules/views/src/Tests/Handler/AreaTest.php
+++ b/core/modules/views/src/Tests/Handler/AreaTest.php
@@ -58,7 +58,7 @@ class AreaTest extends HandlerTestBase {
$types = array('header', 'footer', 'empty');
$labels = array();
foreach ($types as $type) {
- $edit_path = 'admin/structure/views/nojs/handler/test_example_area/default/' . $type .'/test_example';
+ $edit_path = 'admin/structure/views/nojs/handler/test_example_area/default/' . $type . '/test_example';
// First setup an empty label.
$this->drupalPostForm($edit_path, array(), t('Apply'));
diff --git a/core/modules/views/src/Tests/ViewKernelTestBase.php b/core/modules/views/src/Tests/ViewKernelTestBase.php
index 7541d32..3a5df34 100644
--- a/core/modules/views/src/Tests/ViewKernelTestBase.php
+++ b/core/modules/views/src/Tests/ViewKernelTestBase.php
@@ -117,7 +117,7 @@ abstract class ViewKernelTestBase extends KernelTestBase {
$view->setDisplay();
$view->preExecute($args);
$view->execute();
- $verbose_message = '<pre>Executed view: ' . ((string) $view->build_info['query']). '</pre>';
+ $verbose_message = '<pre>Executed view: ' . ((string) $view->build_info['query']) . '</pre>';
if ($view->build_info['query'] instanceof SelectInterface) {
$verbose_message .= '<pre>Arguments: ' . print_r($view->build_info['query']->getArguments(), TRUE) . '</pre>';
}
diff --git a/core/modules/views/src/Tests/ViewTestBase.php b/core/modules/views/src/Tests/ViewTestBase.php
index 0219c3f..6ce3494 100644
--- a/core/modules/views/src/Tests/ViewTestBase.php
+++ b/core/modules/views/src/Tests/ViewTestBase.php
@@ -118,7 +118,7 @@ abstract class ViewTestBase extends WebTestBase {
$view->setDisplay();
$view->preExecute($args);
$view->execute();
- $verbose_message = '<pre>Executed view: ' . ((string) $view->build_info['query']). '</pre>';
+ $verbose_message = '<pre>Executed view: ' . ((string) $view->build_info['query']) . '</pre>';
if ($view->build_info['query'] instanceof SelectInterface) {
$verbose_message .= '<pre>Arguments: ' . print_r($view->build_info['query']->getArguments(), TRUE) . '</pre>';
}
diff --git a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php
index b1f997b..f53309b 100644
--- a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php
+++ b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php
@@ -120,7 +120,7 @@ class ViewsKernelTestBase extends KernelTestBase {
$view->setDisplay();
$view->preExecute($args);
$view->execute();
- $verbose_message = '<pre>Executed view: ' . ((string) $view->build_info['query']). '</pre>';
+ $verbose_message = '<pre>Executed view: ' . ((string) $view->build_info['query']) . '</pre>';
if ($view->build_info['query'] instanceof SelectInterface) {
$verbose_message .= '<pre>Arguments: ' . print_r($view->build_info['query']->getArguments(), TRUE) . '</pre>';
}
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 9283481..e1a4d8c 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -189,7 +189,7 @@ function views_theme($existing, $type, $theme, $path) {
// Whenever we have a theme file, we include it directly so we can
// auto-detect the theme function.
if (isset($def['theme_file'])) {
- $include = \Drupal::root() . '/' . $module_dir. '/' . $def['theme_file'];
+ $include = \Drupal::root() . '/' . $module_dir . '/' . $def['theme_file'];
if (is_file($include)) {
require_once $include;
}
diff --git a/core/modules/views_ui/src/Tests/DisplayCRUDTest.php b/core/modules/views_ui/src/Tests/DisplayCRUDTest.php
index 2485de2..20f57d9 100644
--- a/core/modules/views_ui/src/Tests/DisplayCRUDTest.php
+++ b/core/modules/views_ui/src/Tests/DisplayCRUDTest.php
@@ -35,7 +35,7 @@ class DisplayCRUDTest extends UITestBase {
$settings['page[create]'] = FALSE;
$view = $this->randomView($settings);
- $path_prefix = 'admin/structure/views/view/' . $view['id'] .'/edit';
+ $path_prefix = 'admin/structure/views/view/' . $view['id'] . '/edit';
$this->drupalGet($path_prefix);
// Add a new display.
@@ -54,7 +54,7 @@ class DisplayCRUDTest extends UITestBase {
*/
public function testRemoveDisplay() {
$view = $this->randomView();
- $path_prefix = 'admin/structure/views/view/' . $view['id'] .'/edit';
+ $path_prefix = 'admin/structure/views/view/' . $view['id'] . '/edit';
$this->drupalGet($path_prefix . '/default');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete', 'Delete Page', 'Make sure there is no delete button on the default display.');
@@ -97,7 +97,7 @@ class DisplayCRUDTest extends UITestBase {
*/
public function testDuplicateDisplay() {
$view = $this->randomView();
- $path_prefix = 'admin/structure/views/view/' . $view['id'] .'/edit';
+ $path_prefix = 'admin/structure/views/view/' . $view['id'] . '/edit';
$path = $view['page[path]'];
$this->drupalGet($path_prefix);
diff --git a/core/modules/views_ui/src/Tests/DisplayTest.php b/core/modules/views_ui/src/Tests/DisplayTest.php
index 63c45d3..39b85e4 100644
--- a/core/modules/views_ui/src/Tests/DisplayTest.php
+++ b/core/modules/views_ui/src/Tests/DisplayTest.php
@@ -89,7 +89,7 @@ class DisplayTest extends UITestBase {
*/
public function testDisableDisplay() {
$view = $this->randomView();
- $path_prefix = 'admin/structure/views/view/' . $view['id'] .'/edit';
+ $path_prefix = 'admin/structure/views/view/' . $view['id'] . '/edit';
$this->drupalGet($path_prefix);
$this->assertFalse($this->xpath('//div[contains(@class, :class)]', array(':class' => 'views-display-disabled')), 'Make sure the disabled display css class does not appear after initial adding of a view.');
diff --git a/core/modules/views_ui/src/Tests/HandlerTest.php b/core/modules/views_ui/src/Tests/HandlerTest.php
index e4c628f..63d7e03 100644
--- a/core/modules/views_ui/src/Tests/HandlerTest.php
+++ b/core/modules/views_ui/src/Tests/HandlerTest.php
@@ -276,6 +276,6 @@ class HandlerTest extends UITestBase {
*/
public function assertNoDuplicateField($field_name, $entity_type) {
$elements = $this->xpath('//td[.=:entity_type]/preceding-sibling::td[@class="title" and .=:title]', [':title' => $field_name, ':entity_type' => $entity_type]);
- $this->assertEqual(1, count($elements), $field_name . ' appears just once in ' . $entity_type . '.');
+ $this->assertEqual(1, count($elements), $field_name . ' appears just once in ' . $entity_type . '.');
}
}
diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php
index 00ef836..5f8c095 100644
--- a/core/modules/views_ui/src/ViewEditForm.php
+++ b/core/modules/views_ui/src/ViewEditForm.php
@@ -1071,7 +1071,7 @@ class ViewEditForm extends ViewFormBase {
'type' => $type,
'id' => $id,
), array('attributes' => $link_attributes)));
- $build['fields'][$id]['#class'][] = Html::cleanCssIdentifier($display['id']. '-' . $type . '-' . $id);
+ $build['fields'][$id]['#class'][] = Html::cleanCssIdentifier($display['id'] . '-' . $type . '-' . $id);
if ($executable->display_handler->useGroupBy() && $handler->usesGroupBy()) {
$build['fields'][$id]['#settings_links'][] = $this->l(SafeMarkup::format('<span class="label">@text</span>', array('@text' => $this->t('Aggregation settings'))), new Url('views_ui.form_handler_group', array(
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 98c7283..6a979e2 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -105,4 +105,12 @@
<rule ref="Generic.PHP.UpperCaseConstant"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
+ <!-- Squiz sniffs -->
+ <rule ref="Squiz.Strings.ConcatenationSpacing">
+ <properties>
+ <property name="spacing" value="1"/>
+ <property name="ignoreNewlines" value="true"/>
+ </properties>
+ </rule>
+
</ruleset>
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
index 8532014..e685682 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
@@ -410,9 +410,9 @@ class EntityFieldTest extends EntityKernelTestBase {
// Test getting metadata upfront. The entity types used for this test have
// a default bundle that is the same as the entity type.
$definitions = \Drupal::entityManager()->getFieldDefinitions($entity_type, $entity_type);
- $this->assertEqual($definitions['name']->getType(), 'string', $entity_type .': Name field found.');
- $this->assertEqual($definitions['user_id']->getType(), 'entity_reference', $entity_type .': User field found.');
- $this->assertEqual($definitions['field_test_text']->getType(), 'text', $entity_type .': Test-text-field field found.');
+ $this->assertEqual($definitions['name']->getType(), 'string', $entity_type . ': Name field found.');
+ $this->assertEqual($definitions['user_id']->getType(), 'entity_reference', $entity_type . ': User field found.');
+ $this->assertEqual($definitions['field_test_text']->getType(), 'text', $entity_type . ': Test-text-field field found.');
// Test deriving further metadata.
$this->assertTrue($definitions['name'] instanceof FieldDefinitionInterface);
@@ -450,21 +450,21 @@ class EntityFieldTest extends EntityKernelTestBase {
->create();
$definitions = $entity->getFieldDefinitions();
- $this->assertEqual($definitions['name']->getType(), 'string', $entity_type .': Name field found.');
- $this->assertEqual($definitions['user_id']->getType(), 'entity_reference', $entity_type .': User field found.');
- $this->assertEqual($definitions['field_test_text']->getType(), 'text', $entity_type .': Test-text-field field found.');
+ $this->assertEqual($definitions['name']->getType(), 'string', $entity_type . ': Name field found.');
+ $this->assertEqual($definitions['user_id']->getType(), 'entity_reference', $entity_type . ': User field found.');
+ $this->assertEqual($definitions['field_test_text']->getType(), 'text', $entity_type . ': Test-text-field field found.');
$name_properties = $entity->name->getFieldDefinition()->getPropertyDefinitions();
- $this->assertEqual($name_properties['value']->getDataType(), 'string', $entity_type .': String value property of the name found.');
+ $this->assertEqual($name_properties['value']->getDataType(), 'string', $entity_type . ': String value property of the name found.');
$userref_properties = $entity->user_id->getFieldDefinition()->getPropertyDefinitions();
- $this->assertEqual($userref_properties['target_id']->getDataType(), 'integer', $entity_type .': Entity id property of the user found.');
- $this->assertEqual($userref_properties['entity']->getDataType(), 'entity_reference', $entity_type .': Entity reference property of the user found.');
+ $this->assertEqual($userref_properties['target_id']->getDataType(), 'integer', $entity_type . ': Entity id property of the user found.');
+ $this->assertEqual($userref_properties['entity']->getDataType(), 'entity_reference', $entity_type . ': Entity reference property of the user found.');
$textfield_properties = $entity->field_test_text->getFieldDefinition()->getFieldStorageDefinition()->getPropertyDefinitions();
- $this->assertEqual($textfield_properties['value']->getDataType(), 'string', $entity_type .': String value property of the test-text field found.');
- $this->assertEqual($textfield_properties['format']->getDataType(), 'filter_format', $entity_type .': String format field of the test-text field found.');
- $this->assertEqual($textfield_properties['processed']->getDataType(), 'string', $entity_type .': String processed property of the test-text field found.');
+ $this->assertEqual($textfield_properties['value']->getDataType(), 'string', $entity_type . ': String value property of the test-text field found.');
+ $this->assertEqual($textfield_properties['format']->getDataType(), 'filter_format', $entity_type . ': String format field of the test-text field found.');
+ $this->assertEqual($textfield_properties['processed']->getDataType(), 'string', $entity_type . ': String processed property of the test-text field found.');
// Make sure provided contextual information is right.
$entity_adapter = $entity->getTypedData();
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldModuleUninstallValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldModuleUninstallValidatorTest.php
index 73336a4..af2fb07 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldModuleUninstallValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldModuleUninstallValidatorTest.php
@@ -113,7 +113,7 @@ class FieldModuleUninstallValidatorTest extends EntityKernelTestBase {
$this->enableModules([$module_name]);
}
$this->entityDefinitionUpdateManager->applyUpdates();
- $this->assertTrue($this->getModuleHandler()->moduleExists($module_name), $module_name .' module is enabled.');
+ $this->assertTrue($this->getModuleHandler()->moduleExists($module_name), $module_name . ' module is enabled.');
$this->getModuleInstaller()->uninstall([$module_name]);
$this->entityDefinitionUpdateManager->applyUpdates();
$this->assertFalse($this->getModuleHandler()->moduleExists($module_name), $module_name . ' module is disabled.');
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
index 7536e4a..2abf267 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
@@ -442,7 +442,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase {
public function testGetForInstantiationWithVariousArgumentLengths() {
$args = array();
for ($i = 0; $i < 12; $i++) {
- $instantiation_service = $this->container->get('service_test_instantiation_'. $i);
+ $instantiation_service = $this->container->get('service_test_instantiation_' . $i);
$this->assertEquals($args, $instantiation_service->getArguments());
$args[] = 'arg_' . $i;
}
diff --git a/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php b/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php
index 97ca0ec..b69f2a5 100644
--- a/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php
@@ -370,7 +370,7 @@ class UrlHelperTest extends UnitTestCase {
array(json_decode('"\u00AD"') . "//www.example.com", TRUE),
array(json_decode('"\u200E"') . "//www.example.com", TRUE),
array(json_decode('"\uE0020"') . "//www.example.com", TRUE),
- array(json_decode('"\uE000"') . "//www.example.com", TRUE),
+ array(json_decode('"\uE000"') . "//www.example.com", TRUE),
// Backslashes should be normalized to forward.
array('\\\\example.com', TRUE),
// Local URLs.
diff --git a/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
index c4dd147..831a1de 100644
--- a/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
@@ -77,7 +77,7 @@ class CssOptimizerUnitTest extends UnitTestCase {
*/
function providerTestOptimize() {
$path = 'core/tests/Drupal/Tests/Core/Asset/css_test_files/';
- $absolute_path = dirname(__FILE__) . '/css_test_files/';
+ $absolute_path = dirname(__FILE__) . '/css_test_files/';
return array(
// File. Tests:
// - Stripped comments and white-space.
@@ -188,7 +188,7 @@ class CssOptimizerUnitTest extends UnitTestCase {
'browsers' => array('IE' => TRUE, '!IE' => TRUE),
'basename' => 'css_input_with_bom.css',
),
- '.byte-order-mark-test{content:"☃";}'. "\n",
+ '.byte-order-mark-test{content:"☃";}' . "\n",
),
array(
array(
diff --git a/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php
index c388faf..5b76591 100644
--- a/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php
@@ -37,7 +37,7 @@ class JsOptimizerUnitTest extends UnitTestCase {
* An array of test data.
*/
function providerTestClean() {
- $path = dirname(__FILE__) . '/js_test_files/';
+ $path = dirname(__FILE__) . '/js_test_files/';
return array(
// File. Tests:
// - Stripped sourceMappingURL with comment # syntax.
@@ -84,7 +84,7 @@ class JsOptimizerUnitTest extends UnitTestCase {
* An array of test data.
*/
function providerTestOptimize() {
- $path = dirname(__FILE__) . '/js_test_files/';
+ $path = dirname(__FILE__) . '/js_test_files/';
return array(
0 => array(
array(