diff --git a/composer.json b/composer.json index 7f3cbf15e53c9e6143e6bef6fd034c881ccba8f7..4623c29bf4a71df2542102dc6e2a09ce60dfd41e 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 5f0c7ea8717b9965700dc80ff4a96d3c53093a36..b6c530855a8ca7118c9c5066ed86d497846a5690 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 d54ab24e43cc578eb1f4ba3f90be974040cce7d4..e7ee87deafa8ce871263c398b93708dd7aacf32c 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 f9dbf7c77ec72f58d6bc16d782a94c702cda4407..fc598803aef359971542fe7cae28cb07ff2a6ff4 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 bb56ba545d071258e562de9a2355228469335177..cadc4d93d52f8d3f4f47ca1a84291ad0007fc876 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 bce7bb719be07045b3bf269d13d01df1b63502f0..15d18cfc0049d0cbc2ae679724fc203218972386 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 f590a3262727526d5f23a64b9a9000cfb67d0b8d..c5510aa05ce7286fdafbce2086acbb6bc7d15392 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 26e9d5d96973f1b76c06daad147c3ac08e8b1e07..8322cf884010af0f45b8ba591109106da3a3b51c 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 7bac6f7934d9779809e3b21bdc9a66c641accb22..200aaece7584d644e3e0c2ec1253c5d2779dae6d 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 81cd2c369e2006d4b8a74aa813c62dfe97a69b54..d56b865f1a0a235a974889d37d91834433563133 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"/>