diff --git a/composer.lock b/composer.lock
index 6910d8ff7e44..94f5defe42e8 100644
--- a/composer.lock
+++ b/composer.lock
@@ -3379,22 +3379,28 @@
},
{
"name": "drupal/coder",
- "version": "8.2.12",
+ "version": "8.3.1",
"source": {
"type": "git",
"url": "https://git.drupal.org/project/coder.git",
- "reference": "984c54a7b1e8f27ff1c32348df69712afd86b17f"
+ "reference": "29a25627e7148b3119c84f18e087fc3b8c85b959"
},
"require": {
"ext-mbstring": "*",
"php": ">=5.4.0",
- "squizlabs/php_codesniffer": ">=2.8.1 <3.0",
+ "squizlabs/php_codesniffer": "^3.0.1",
"symfony/yaml": ">=2.0.0"
},
"require-dev": {
"phpunit/phpunit": ">=3.7 <6"
},
"type": "phpcodesniffer-standard",
+ "autoload": {
+ "psr-0": {
+ "Drupal\\": "coder_sniffer/Drupal/",
+ "DrupalPractice\\": "coder_sniffer/Drupal/"
+ }
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
@@ -3406,7 +3412,7 @@
"phpcs",
"standards"
],
- "time": "2017-03-18T10:28:49+00:00"
+ "time": "2018-09-21T14:22:49+00:00"
},
{
"name": "fabpot/goutte",
@@ -4654,64 +4660,37 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "2.8.1",
+ "version": "3.4.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d"
+ "reference": "5b4333b4010625d29580eb4a41f1e53251be6baa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d",
- "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5b4333b4010625d29580eb4a41f1e53251be6baa",
+ "reference": "5b4333b4010625d29580eb4a41f1e53251be6baa",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
- "php": ">=5.1.2"
+ "php": ">=5.4.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0"
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"bin": [
- "scripts/phpcs",
- "scripts/phpcbf"
+ "bin/phpcs",
+ "bin/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.x-dev"
+ "dev-master": "3.x-dev"
}
},
- "autoload": {
- "classmap": [
- "CodeSniffer.php",
- "CodeSniffer/CLI.php",
- "CodeSniffer/Exception.php",
- "CodeSniffer/File.php",
- "CodeSniffer/Fixer.php",
- "CodeSniffer/Report.php",
- "CodeSniffer/Reporting.php",
- "CodeSniffer/Sniff.php",
- "CodeSniffer/Tokens.php",
- "CodeSniffer/Reports/",
- "CodeSniffer/Tokenizers/",
- "CodeSniffer/DocGenerators/",
- "CodeSniffer/Standards/AbstractPatternSniff.php",
- "CodeSniffer/Standards/AbstractScopeSniff.php",
- "CodeSniffer/Standards/AbstractVariableSniff.php",
- "CodeSniffer/Standards/IncorrectPatternException.php",
- "CodeSniffer/Standards/Generic/Sniffs/",
- "CodeSniffer/Standards/MySource/Sniffs/",
- "CodeSniffer/Standards/PEAR/Sniffs/",
- "CodeSniffer/Standards/PSR1/Sniffs/",
- "CodeSniffer/Standards/PSR2/Sniffs/",
- "CodeSniffer/Standards/Squiz/Sniffs/",
- "CodeSniffer/Standards/Zend/Sniffs/"
- ]
- },
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
@@ -4723,12 +4702,12 @@
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
- "homepage": "http://www.squizlabs.com/php-codesniffer",
+ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards"
],
- "time": "2017-03-01T22:17:45+00:00"
+ "time": "2019-03-19T03:22:27+00:00"
},
{
"name": "symfony/browser-kit",
diff --git a/core/composer.json b/core/composer.json
index bb414909ef50..2cd89a7b820f 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -56,7 +56,7 @@
"behat/mink": "1.7.x-dev",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "1.3.x-dev",
- "drupal/coder": "^8.2.12",
+ "drupal/coder": "^8.3.1",
"jcalderonzumba/gastonjs": "^1.0.2",
"jcalderonzumba/mink-phantomjs-driver": "^0.3.1",
"mikey179/vfsstream": "^1.2",
diff --git a/core/lib/Drupal/Component/Utility/Timer.php b/core/lib/Drupal/Component/Utility/Timer.php
index 4fc36e43aea9..b086bfbcd34b 100644
--- a/core/lib/Drupal/Component/Utility/Timer.php
+++ b/core/lib/Drupal/Component/Utility/Timer.php
@@ -9,7 +9,7 @@ namespace Drupal\Component\Utility;
*/
class Timer {
- static protected $timers = [];
+ protected static $timers = [];
/**
* Starts the timer with the specified name.
diff --git a/core/lib/Drupal/Core/Database/Database.php b/core/lib/Drupal/Core/Database/Database.php
index f29b60ef990f..d13ea80862a3 100644
--- a/core/lib/Drupal/Core/Database/Database.php
+++ b/core/lib/Drupal/Core/Database/Database.php
@@ -40,28 +40,28 @@ abstract class Database {
*
* @var array
*/
- static protected $connections = [];
+ protected static $connections = [];
/**
* A processed copy of the database connection information from settings.php.
*
* @var array
*/
- static protected $databaseInfo = [];
+ protected static $databaseInfo = [];
/**
* A list of key/target credentials to simply ignore.
*
* @var array
*/
- static protected $ignoreTargets = [];
+ protected static $ignoreTargets = [];
/**
* The key of the currently active database connection.
*
* @var string
*/
- static protected $activeKey = 'default';
+ protected static $activeKey = 'default';
/**
* An array of active query log objects.
@@ -75,7 +75,7 @@ abstract class Database {
*
* @var array
*/
- static protected $logs = [];
+ protected static $logs = [];
/**
* Starts logging a given logging key on the specified connection.
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
index f3e19e93e211..1b3f60ff4a78 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
@@ -192,8 +192,7 @@ class SqlContentEntityStorageSchema implements DynamicallyFieldableEntityStorage
* {@inheritdoc}
*/
public function requiresEntityStorageSchemaChanges(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
- return
- $this->hasSharedTableStructureChange($entity_type, $original) ||
+ return $this->hasSharedTableStructureChange($entity_type, $original) ||
// Detect changes in key or index definitions.
$this->getEntitySchemaData($entity_type, $this->getEntitySchema($entity_type, TRUE)) != $this->loadEntitySchemaData($original);
}
@@ -211,8 +210,7 @@ class SqlContentEntityStorageSchema implements DynamicallyFieldableEntityStorage
* a table has been renamed.
*/
protected function hasSharedTableStructureChange(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
- return
- $entity_type->isRevisionable() != $original->isRevisionable() ||
+ return $entity_type->isRevisionable() != $original->isRevisionable() ||
$entity_type->isTranslatable() != $original->isTranslatable() ||
$this->hasSharedTableNameChanges($entity_type, $original);
}
@@ -237,8 +235,7 @@ class SqlContentEntityStorageSchema implements DynamicallyFieldableEntityStorage
// We first check if the new table already exists because the storage might
// have created it even though it wasn't specified in the entity type
// definition.
- return
- (!$base_table && $entity_type->getBaseTable() != $original->getBaseTable()) ||
+ return (!$base_table && $entity_type->getBaseTable() != $original->getBaseTable()) ||
(!$data_table && $entity_type->getDataTable() != $original->getDataTable()) ||
(!$revision_table && $entity_type->getRevisionTable() != $original->getRevisionTable()) ||
(!$revision_data_table && $entity_type->getRevisionDataTable() != $original->getRevisionDataTable());
diff --git a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php
index 4b3da241aaaf..45b200d73970 100644
--- a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php
+++ b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php
@@ -36,7 +36,7 @@ class FileTransferAuthorizeForm extends FormBase {
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
- return new static ($container->get('app.root'));
+ return new static($container->get('app.root'));
}
/**
diff --git a/core/lib/Drupal/Core/Render/Element/HtmlTag.php b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
index 98cf6363eed5..12c0edfa6230 100644
--- a/core/lib/Drupal/Core/Render/Element/HtmlTag.php
+++ b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
@@ -38,7 +38,7 @@ class HtmlTag extends RenderElement {
* @see http://www.w3.org/TR/html5/syntax.html#syntax-start-tag
* @see http://www.w3.org/TR/html5/syntax.html#void-elements
*/
- static protected $voidElements = [
+ protected static $voidElements = [
'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input',
'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr',
'rect', 'circle', 'polygon', 'ellipse', 'stop', 'use', 'path',
diff --git a/core/lib/Drupal/Core/Render/PlaceholderGenerator.php b/core/lib/Drupal/Core/Render/PlaceholderGenerator.php
index fad8cf745043..467a07e74ab4 100644
--- a/core/lib/Drupal/Core/Render/PlaceholderGenerator.php
+++ b/core/lib/Drupal/Core/Render/PlaceholderGenerator.php
@@ -33,10 +33,8 @@ class PlaceholderGenerator implements PlaceholderGeneratorInterface {
* {@inheritdoc}
*/
public function canCreatePlaceholder(array $element) {
- return
- // If generated by a #lazy_builder callback, placeholdering is possible.
- isset($element['#lazy_builder'])
- &&
+ // If generated by a #lazy_builder callback, placeholdering is possible.
+ return isset($element['#lazy_builder']) &&
// If #create_placeholder === FALSE, placeholdering is disallowed.
(!isset($element['#create_placeholder']) || $element['#create_placeholder'] !== FALSE);
}
diff --git a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareBlock.php b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareBlock.php
index 33c0a71b1e28..edc66168d3cc 100644
--- a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareBlock.php
+++ b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareBlock.php
@@ -30,7 +30,7 @@ class TestContextAwareBlock extends BlockBase {
return [
'#prefix' => '
',
'#suffix' => '
',
- '#markup' => $user ? $user->getAccountName() : 'No context mapping selected.' ,
+ '#markup' => $user ? $user->getAccountName() : 'No context mapping selected.',
];
}
diff --git a/core/modules/config_translation/src/ConfigEntityMapper.php b/core/modules/config_translation/src/ConfigEntityMapper.php
index cdf07bfc63b7..69c1211cfeef 100644
--- a/core/modules/config_translation/src/ConfigEntityMapper.php
+++ b/core/modules/config_translation/src/ConfigEntityMapper.php
@@ -100,7 +100,7 @@ class ConfigEntityMapper extends ConfigNamesMapper {
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
// Note that we ignore the plugin $configuration because mappers have
// nothing to configure in themselves.
- return new static (
+ return new static(
$plugin_id,
$plugin_definition,
$container->get('config.factory'),
diff --git a/core/modules/config_translation/src/ConfigNamesMapper.php b/core/modules/config_translation/src/ConfigNamesMapper.php
index f5f0d55004ad..d63807a26f44 100644
--- a/core/modules/config_translation/src/ConfigNamesMapper.php
+++ b/core/modules/config_translation/src/ConfigNamesMapper.php
@@ -153,7 +153,7 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
// Note that we ignore the plugin $configuration because mappers have
// nothing to configure in themselves.
- return new static (
+ return new static(
$plugin_id,
$plugin_definition,
$container->get('config.factory'),
diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc
index bba1dd38c596..a7bfc1d244dd 100644
--- a/core/modules/content_translation/content_translation.admin.inc
+++ b/core/modules/content_translation/content_translation.admin.inc
@@ -182,8 +182,7 @@ function _content_translation_is_field_translatability_configurable(EntityTypeIn
// Allow to configure only fields supporting multilingual storage. We skip our
// own fields as they are always translatable. Additionally we skip a set of
// well-known fields implementing entity system business logic.
- return
- $definition->isTranslatable() &&
+ return $definition->isTranslatable() &&
$definition->getProvider() != 'content_translation' &&
!in_array($definition->getName(), [$entity_type->getKey('langcode'), $entity_type->getKey('default_langcode'), 'revision_translation_affected']);
}
diff --git a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
index ab9fdf1e353f..4aaf196e6ab8 100644
--- a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
@@ -491,7 +491,7 @@ class FileFieldWidgetTest extends FileFieldTestBase {
// Have attacker create a new node with a different uploaded file and
// ensure it got uploaded successfully.
$edit = [
- 'title[0][value]' => $type . '-title' ,
+ 'title[0][value]' => $type . '-title',
];
// Attach a file to a node.
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
index 128b7b1d30c2..67fdb1a97e76 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
@@ -416,8 +416,7 @@ class LocaleConfigSubscriberTest extends KernelTestBase {
*/
protected function assertActiveConfig($config_name, $key, $value, $langcode) {
$config = $this->configFactory->getEditable($config_name);
- return
- $this->assertEqual($config->get('langcode'), $langcode) &&
+ return $this->assertEqual($config->get('langcode'), $langcode) &&
$this->assertIdentical($config->get($key), $value);
}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceRestTestCoverageTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceRestTestCoverageTest.php
index 1c3523ffe055..0ef640bbb15f 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceRestTestCoverageTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceRestTestCoverageTest.php
@@ -33,8 +33,7 @@ class EntityResourceRestTestCoverageTest extends BrowserTestBase {
$stable_core_modules = array_filter($all_modules, function ($module) {
// Filter out contrib, hidden, testing, and experimental modules. We also
// don't need to enable modules that are already enabled.
- return
- $module->origin === 'core' &&
+ return $module->origin === 'core' &&
empty($module->info['hidden']) &&
$module->status == FALSE &&
$module->info['package'] !== 'Testing' &&
diff --git a/core/modules/serialization/src/Encoder/XmlEncoder.php b/core/modules/serialization/src/Encoder/XmlEncoder.php
index e41f52b957a1..f80955b54c03 100644
--- a/core/modules/serialization/src/Encoder/XmlEncoder.php
+++ b/core/modules/serialization/src/Encoder/XmlEncoder.php
@@ -27,7 +27,7 @@ class XmlEncoder implements SerializerAwareInterface, EncoderInterface, DecoderI
*
* @var array
*/
- static protected $format = ['xml'];
+ protected static $format = ['xml'];
/**
* An instance of the Symfony XmlEncoder to perform the actual encoding.
diff --git a/core/modules/serialization/tests/serialization_test/src/SerializationTestEncoder.php b/core/modules/serialization/tests/serialization_test/src/SerializationTestEncoder.php
index 165e978580e0..7148afcc052f 100644
--- a/core/modules/serialization/tests/serialization_test/src/SerializationTestEncoder.php
+++ b/core/modules/serialization/tests/serialization_test/src/SerializationTestEncoder.php
@@ -11,7 +11,7 @@ class SerializationTestEncoder implements EncoderInterface {
*
* @var string
*/
- static protected $format = 'serialization_test';
+ protected static $format = 'serialization_test';
/**
* {@inheritdoc}
diff --git a/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php b/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php
index 2105adf5981f..2c8a96265ee9 100644
--- a/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php
+++ b/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php
@@ -11,7 +11,7 @@ class SerializationTestNormalizer implements NormalizerInterface {
*
* @var string
*/
- static protected $format = 'serialization_test';
+ protected static $format = 'serialization_test';
/**
* Normalizes an object into a set of arrays/scalars.
diff --git a/core/modules/simpletest/src/TestDiscovery.php b/core/modules/simpletest/src/TestDiscovery.php
index 671048d702fc..a9cbe15db7d5 100644
--- a/core/modules/simpletest/src/TestDiscovery.php
+++ b/core/modules/simpletest/src/TestDiscovery.php
@@ -293,8 +293,7 @@ class TestDiscovery {
// We don't want to discover abstract TestBase classes, traits or
// interfaces. They can be deprecated and will call @trigger_error()
// during discovery.
- return
- substr($file_name, -4) === '.php' &&
+ return substr($file_name, -4) === '.php' &&
substr($file_name, -12) !== 'TestBase.php' &&
substr($file_name, -9) !== 'Trait.php' &&
substr($file_name, -13) !== 'Interface.php';
diff --git a/core/modules/system/src/Form/FileSystemForm.php b/core/modules/system/src/Form/FileSystemForm.php
index b0ca6d129eff..dedf32a69fac 100644
--- a/core/modules/system/src/Form/FileSystemForm.php
+++ b/core/modules/system/src/Form/FileSystemForm.php
@@ -53,7 +53,7 @@ class FileSystemForm extends ConfigFormBase {
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
- return new static (
+ return new static(
$container->get('config.factory'),
$container->get('date.formatter'),
$container->get('stream_wrapper_manager')
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
index 1488c5b3e445..a399bed73d96 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
@@ -16,7 +16,7 @@ class ThemeTokenTest extends BrowserTestBase {
*
* @var array
*/
- static public $modules = ['block'];
+ public static $modules = ['block'];
/**
* {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/PathHooksTest.php b/core/modules/system/tests/src/Kernel/PathHooksTest.php
index fcbb499979cc..892c7d1abd7e 100644
--- a/core/modules/system/tests/src/Kernel/PathHooksTest.php
+++ b/core/modules/system/tests/src/Kernel/PathHooksTest.php
@@ -15,7 +15,7 @@ class PathHooksTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
- static public $modules = ['system'];
+ public static $modules = ['system'];
/**
* Test system_path_*() correctly clears caches.
diff --git a/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php b/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
index 8a5385c2fe81..24ce60ba3f09 100644
--- a/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
+++ b/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
@@ -54,8 +54,7 @@ class TimezoneTest extends KernelTestBase {
$ungrouped_count = count(system_time_zones());
$grouped_result = system_time_zones(NULL, TRUE);
$grouped_count = 0;
- array_walk_recursive($grouped_result, function () use
- (&$grouped_count) {
+ array_walk_recursive($grouped_result, function () use (&$grouped_count) {
$grouped_count++;
});
$this->assertEquals($ungrouped_count, $grouped_count);
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index f46d61e0cbb0..b081cce74dd2 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -978,8 +978,6 @@ function user_mail_tokens(&$replacements, $data, $options) {
}
}
-/*** Administrative features ***********************************************/
-
/**
* Retrieves the names of roles matching specified conditions.
*
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index b5f3f4847b88..4738cba5b436 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -24,11 +24,11 @@
-
+
-
-
-
+
+
+
@@ -207,6 +207,9 @@
0
+
+ 0
+
0
diff --git a/core/tests/Drupal/Tests/Component/Utility/CryptRandomFallbackTest.php b/core/tests/Drupal/Tests/Component/Utility/CryptRandomFallbackTest.php
index 4d02e1e80471..a9f68cbfa6d1 100644
--- a/core/tests/Drupal/Tests/Component/Utility/CryptRandomFallbackTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/CryptRandomFallbackTest.php
@@ -16,7 +16,7 @@ use PHPUnit\Framework\TestCase;
*/
class CryptRandomFallbackTest extends TestCase {
- static protected $functionCalled = 0;
+ protected static $functionCalled = 0;
/**
* Allows the test to confirm that the namespaced random_bytes() was called.
diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
index bc32d04ba681..1151382b1dfb 100644
--- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
@@ -241,7 +241,6 @@ EOD;
}
}
-
namespace {
if (!function_exists('drupal_valid_test_ua')) {