From a0bdf62a3381fe488cead32bd3823c2f81e9e46f Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Tue, 7 Jan 2020 11:26:29 +0000 Subject: [PATCH] Issue #3099583 by alexpott, klausi, neclimdul, heddn: Update coder to 8.3.7 --- composer.json | 2 +- composer.lock | 2 +- .../Metapackage/DevDependencies/composer.json | 2 +- core/lib/Drupal.php | 1 - .../Component/Datetime/DateTimePlus.php | 19 ++++++++++++------- .../Core/Config/Entity/Query/QueryFactory.php | 2 +- .../src/ModerationInformation.php | 2 +- .../tests/src/Functional/UpdateCoreTest.php | 1 - .../src/Unit/ProjectCoreCompatibilityTest.php | 1 - core/phpcs.xml.dist | 6 +++++- 10 files changed, 22 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index 7f3cbf15e53c..4623c29bf4a7 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "behat/mink-goutte-driver": "^1.2", "behat/mink-selenium2-driver": "1.3.x-dev", "composer/composer": "^1.9.1", - "drupal/coder": "^8.3.2", + "drupal/coder": "^8.3.7", "mikey179/vfsstream": "^1.6.8", "phpunit/phpunit": "^6.5 || ^7", "phpspec/prophecy": "^1.7", diff --git a/composer.lock b/composer.lock index 5f0c7ea8717b..b6c530855a8c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "119e460e27fcb0c3479da1f05fbc90d9", + "content-hash": "44be8fe4b9cabf6f383e410de1d44129", "packages": [ { "name": "asm89/stack-cors", diff --git a/composer/Metapackage/DevDependencies/composer.json b/composer/Metapackage/DevDependencies/composer.json index d54ab24e43cc..e7ee87deafa8 100644 --- a/composer/Metapackage/DevDependencies/composer.json +++ b/composer/Metapackage/DevDependencies/composer.json @@ -11,7 +11,7 @@ "behat/mink-goutte-driver": "^1.2", "behat/mink-selenium2-driver": "1.4.0 | 1.3.1.1 | 1.3.x-dev", "composer/composer": "^1.9.1", - "drupal/coder": "^8.3.2", + "drupal/coder": "^8.3.7", "easyrdf/easyrdf": "^0.9", "justinrainbow/json-schema": "^5.2", "mikey179/vfsstream": "^1.6.8", diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php index f9dbf7c77ec7..fc598803aef3 100644 --- a/core/lib/Drupal.php +++ b/core/lib/Drupal.php @@ -7,7 +7,6 @@ use Drupal\Core\DependencyInjection\ContainerNotInitializedException; use Drupal\Core\Messenger\LegacyMessenger; -use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/core/lib/Drupal/Component/Datetime/DateTimePlus.php b/core/lib/Drupal/Component/Datetime/DateTimePlus.php index bb56ba545d07..cadc4d93d52f 100644 --- a/core/lib/Drupal/Component/Datetime/DateTimePlus.php +++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php @@ -129,7 +129,8 @@ class DateTimePlus { * @param \DateTime $datetime * A DateTime object. * @param array $settings - * @see __construct() + * (optional) A keyed array for settings, suitable for passing on to + * __construct(). * * @return static * A new DateTimePlus object. @@ -183,9 +184,11 @@ public static function createFromArray(array $date_parts, $timezone = NULL, $set * @param int $timestamp * A UNIX timestamp. * @param mixed $timezone - * @see __construct() + * (optional) \DateTimeZone object, time zone string or NULL. See + * __construct() for more details. * @param array $settings - * @see __construct() + * (optional) A keyed array for settings, suitable for passing on to + * __construct(). * * @return static * A new DateTimePlus object. @@ -211,11 +214,14 @@ public static function createFromTimestamp($timestamp, $timezone = NULL, $settin * any other specialized input with a known format. If provided the * date will be created using the createFromFormat() method. * @see http://php.net/manual/datetime.createfromformat.php - * @param mixed $time - * @see __construct() + * @param string $time + * String representing the time. * @param mixed $timezone - * @see __construct() + * (optional) \DateTimeZone object, time zone string or NULL. See + * __construct() for more details. * @param array $settings + * (optional) A keyed array for settings, suitable for passing on to + * __construct(). Supports an additional key: * - validate_format: (optional) Boolean choice to validate the * created date using the input format. The format used in * createFromFormat() allows slightly different values than format(). @@ -223,7 +229,6 @@ public static function createFromTimestamp($timestamp, $timezone = NULL, $settin * possible to a validation step to confirm that the date created * from a format string exactly matches the input. This option * indicates the format can be used for validation. Defaults to TRUE. - * @see __construct() * * @return static * A new DateTimePlus object. diff --git a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php index bce7bb719be0..15d18cfc0049 100644 --- a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php +++ b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php @@ -136,7 +136,7 @@ protected function deleteConfigKeyStore(ConfigEntityTypeInterface $entity_type, * * @param \Drupal\Core\Config\Config $config * The configuration object. - * @param string $key + * @param string $key * The configuration key to look for. * @param string $get_method * Which method on the config object to call to get the value. Either 'get' diff --git a/core/modules/content_moderation/src/ModerationInformation.php b/core/modules/content_moderation/src/ModerationInformation.php index f590a3262727..c5510aa05ce7 100644 --- a/core/modules/content_moderation/src/ModerationInformation.php +++ b/core/modules/content_moderation/src/ModerationInformation.php @@ -152,7 +152,7 @@ public function isDefaultRevisionPublished(ContentEntityInterface $entity) { // If no default revision could be loaded, the entity has not yet been // saved. In this case the moderation_state of the unsaved entity can be // used, since once saved it will become the default. - $default_revision = $default_revision ?: $entity; + $default_revision = $default_revision ?: $entity; // Ensure we are checking all translations of the default revision. if ($default_revision instanceof TranslatableInterface && $default_revision->isTranslatable()) { diff --git a/core/modules/update/tests/src/Functional/UpdateCoreTest.php b/core/modules/update/tests/src/Functional/UpdateCoreTest.php index 26e9d5d96973..8322cf884010 100644 --- a/core/modules/update/tests/src/Functional/UpdateCoreTest.php +++ b/core/modules/update/tests/src/Functional/UpdateCoreTest.php @@ -572,7 +572,6 @@ public function testLocalActions() { $this->assertUrl('admin/reports/updates/install'); } - /** * {@inheritdoc} */ diff --git a/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php b/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php index 7bac6f7934d9..200aaece7584 100644 --- a/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php +++ b/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php @@ -132,4 +132,3 @@ public function providerSetProjectCoreCompatibilityRanges() { } } - diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 81cd2c369e20..d56b865f1a0a 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -141,7 +141,6 @@ <rule ref="Drupal.WhiteSpace.ObjectOperatorSpacing"/> <rule ref="Drupal.WhiteSpace.OpenBracketSpacing"/> <rule ref="Drupal.WhiteSpace.OpenTagNewline"/> - <rule ref="Drupal.WhiteSpace.OperatorSpacing"/> <rule ref="Drupal.WhiteSpace.ScopeClosingBrace"/> <rule ref="Drupal.WhiteSpace.ScopeIndent"/> @@ -329,6 +328,11 @@ </properties> </rule> <rule ref="Squiz.WhiteSpace.LanguageConstructSpacing" /> + <rule ref="Squiz.WhiteSpace.OperatorSpacing"> + <properties> + <property name="ignoreNewlines" value="true"/> + </properties> + </rule> <rule ref="Squiz.WhiteSpace.SemicolonSpacing"/> <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/> -- GitLab