diff --git a/composer.lock b/composer.lock index 6910d8ff7e44dfa79817ddfe1a8371b5f6f1f1c3..94f5defe42e8a0586b1576393a14523f607213b5 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 bb414909ef504c90d55867ad58d4f436759cd1f2..2cd89a7b820f8cea8fca218b5e474d70724ff40f 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 4fc36e43aea994cc9bba043f61bf9914001d95ef..b086bfbcd34b37862588bf7e78079d4b9547e3f7 100644 --- a/core/lib/Drupal/Component/Utility/Timer.php +++ b/core/lib/Drupal/Component/Utility/Timer.php @@ -9,7 +9,7 @@ */ 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 f29b60ef990fd717f2e7826b0a4be96263f0eeea..d13ea80862a325bd391125b6034d825309ce304e 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 f3e19e93e21123e55ea5e8091911353136c5e421..1b3f60ff4a78b70f02a259df526e7bc63512ef3d 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -192,8 +192,7 @@ protected function getTableMapping(EntityTypeInterface $entity_type, array $stor * {@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 @@ public function requiresEntityStorageSchemaChanges(EntityTypeInterface $entity_t * 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 @@ protected function hasSharedTableNameChanges(EntityTypeInterface $entity_type, E // 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 4b3da241aaaf6f1cfc4a6b25c385702d4e037908..45b200d739705358446afaf3e9766b8bdfe880a5 100644 --- a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php +++ b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php @@ -36,7 +36,7 @@ public function __construct($root) { * {@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 98cf6363eed5c7f65998cdcd8cf71b4a73a9ff99..12c0edfa62300423c1e8832cf6bca10cfe5767de 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 fad8cf745043cdf834205956a02a5e3cf654739d..467a07e74ab4722ec8053533e3f6750f20ab3338 100644 --- a/core/lib/Drupal/Core/Render/PlaceholderGenerator.php +++ b/core/lib/Drupal/Core/Render/PlaceholderGenerator.php @@ -33,10 +33,8 @@ public function __construct(array $renderer_config) { * {@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 33c0a71b1e288e173132e0621d710c2c0e72f48e..edc66168d3cc55a7015ae5cdef93e53159a9d751 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 @@ public function build() { return [ '#prefix' => '<div id="' . $this->getPluginId() . '--username">', '#suffix' => '</div>', - '#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 cdf07bfc63b7a0ea5c5195fbd1889ea4cdd00d1a..69c1211cfeefc9c00c16c7f7b9ac4fa09afc01fb 100644 --- a/core/modules/config_translation/src/ConfigEntityMapper.php +++ b/core/modules/config_translation/src/ConfigEntityMapper.php @@ -100,7 +100,7 @@ public function __construct($plugin_id, $plugin_definition, ConfigFactoryInterfa 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 f5f0d55004ad7abef7e333693ee81afe3998ca8b..d63807a26f440a545165af658e0b7a1b10bb9af9 100644 --- a/core/modules/config_translation/src/ConfigNamesMapper.php +++ b/core/modules/config_translation/src/ConfigNamesMapper.php @@ -153,7 +153,7 @@ public function __construct($plugin_id, $plugin_definition, ConfigFactoryInterfa 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 bba1dd38c59620fe0086c4471b95244fea7a98cb..a7bfc1d244dd6674a58fea3d4d4b3e7a724a54da 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 ab9fdf1e353f56dd8d5500fd44a3ab4ccd4a3a5f..4aaf196e6ab84aa323aeef235453231be5dbaa7d 100644 --- a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php @@ -491,7 +491,7 @@ protected function doTestTemporaryFileRemovalExploit(UserInterface $victim_user, // 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 128b7b1d30c23660c81510122d2af7db43472bf1..67fdb1a97e76b1acd92eec342cd8080609a3d093 100644 --- a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php +++ b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php @@ -416,8 +416,7 @@ protected function assertConfigOverride($config_name, $key, $value, $langcode) { */ 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 1c3523ffe055a048b7e006d6d3bae6340ce9a37a..0ef640bbb15f55d1b9f5ae859ad6742149e23e95 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 @@ protected function setUp() { $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 e41f52b957a1b46935c6b78479a2c841cde60615..f80955b54c03caab8f33744d6f9893f9f100177f 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 165e978580e0377d37e6549d643eb2830b55e532..7148afcc052ff508b1c91faeff88ef72cb8187ba 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 2105adf5981f85f89dbc8a817ae50beb772ec1ab..2c8a96265ee9ef3e1dca5d37db6387f0bb99df31 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 671048d702fc36a0341b79e59cf57db3477c5c3f..a9cbe15db7d5104176deb8820aaaa9b02f1cfb0b 100644 --- a/core/modules/simpletest/src/TestDiscovery.php +++ b/core/modules/simpletest/src/TestDiscovery.php @@ -293,8 +293,7 @@ public static function scanDirectory($namespace_prefix, $path) { // 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 b0ca6d129eff360ca7b276f095e6d49cf954372a..dedf32a69facbd7273ac383ffc473ac93e67f6d1 100644 --- a/core/modules/system/src/Form/FileSystemForm.php +++ b/core/modules/system/src/Form/FileSystemForm.php @@ -53,7 +53,7 @@ public function __construct(ConfigFactoryInterface $config_factory, DateFormatte * {@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 1488c5b3e44548388d125e776407a5bc5aef7f2e..a399bed73d967f7354c37070d835ddb02ff49793 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 fcbb499979cc261ff78d54080e36bb153d5f1fbb..892c7d1abd7ef448c882a72b848d7280b55ed924 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 8a5385c2fe81e29b9c60860327d86da01e016290..24ce60ba3f09e9bf83f78b11a87447ece0e59c49 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 @@ public function testSystemTimeZones() { $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 f46d61e0cbb00045d8d0b5d96055fd533514f920..b081cce74dd2f927252eb31faeda4f21b6efb678 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 b5f3f4847b88add10d31f43136cc9103adc6d254..4738cba5b436ffe8a085be09ce089e33adf939fd 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -24,11 +24,11 @@ <!-- Only include specific sniffs that pass. This ensures that, if new sniffs are added, HEAD does not fail.--> <!-- Drupal sniffs --> - <rule ref="Drupal.Array.Array"> + <rule ref="Drupal.Arrays.Array"> <!-- Sniff for these errors: CommaLastItem --> - <exclude name="Drupal.Array.Array.ArrayClosingIndentation"/> - <exclude name="Drupal.Array.Array.ArrayIndentation"/> - <exclude name="Drupal.Array.Array.LongLineDeclaration"/> + <exclude name="Drupal.Arrays.Array.ArrayClosingIndentation"/> + <exclude name="Drupal.Arrays.Array.ArrayIndentation"/> + <exclude name="Drupal.Arrays.Array.LongLineDeclaration"/> </rule> <rule ref="Drupal.Classes.ClassCreateInstance"/> <rule ref="Drupal.Classes.ClassDeclaration"/> @@ -207,6 +207,9 @@ <rule ref="PEAR.Functions.FunctionCallSignature.Indent"> <severity>0</severity> </rule> + <rule ref="PEAR.Functions.FunctionCallSignature.OpeningIndent"> + <severity>0</severity> + </rule> <rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"> <severity>0</severity> </rule> diff --git a/core/tests/Drupal/Tests/Component/Utility/CryptRandomFallbackTest.php b/core/tests/Drupal/Tests/Component/Utility/CryptRandomFallbackTest.php index 4d02e1e804716a3c4f46893c9d1a052aa6c18bf8..a9f68cbfa6d1ce0a4c2204a08c78b25c88c7654c 100644 --- a/core/tests/Drupal/Tests/Component/Utility/CryptRandomFallbackTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/CryptRandomFallbackTest.php @@ -16,7 +16,7 @@ */ 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 bc32d04ba6810678ea1655428fb13a4fcb48ba6f..1151382b1dfb06e1522075f3ded44823b60ce731 100644 --- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php @@ -241,7 +241,6 @@ public function findFile() { } } - namespace { if (!function_exists('drupal_valid_test_ua')) {