From 0192048dca94685517ea88f09a1c8254dcbc0aff Mon Sep 17 00:00:00 2001 From: Lee Rowlands <lee.rowlands@previousnext.com.au> Date: Thu, 29 Aug 2019 13:02:37 +1000 Subject: [PATCH] Issue #3063323 by idebr, klausi, truls1502: Update drupal/coder to 8.3.6 --- composer.lock | 10 ++++---- core/includes/batch.inc | 2 +- .../Drupal/Core/Form/FormBuilderInterface.php | 25 ++++++++++--------- .../Kernel/ContentModerationSyncingTest.php | 10 ++++---- core/modules/tour/src/Tests/TourTestBase.php | 6 ++--- .../tests/src/Functional/TourTestBase.php | 6 ++--- core/phpcs.xml.dist | 1 + 7 files changed, 31 insertions(+), 29 deletions(-) diff --git a/composer.lock b/composer.lock index 775324f2471f..d7ad57d22f4c 100644 --- a/composer.lock +++ b/composer.lock @@ -3821,17 +3821,17 @@ }, { "name": "drupal/coder", - "version": "8.3.4", + "version": "8.3.6", "source": { "type": "git", - "url": "https://git.drupal.org/project/coder.git", - "reference": "0a274321f4930f186d9f246783f0b4d743501cf8" + "url": "https://git.drupalcode.org/project/coder.git", + "reference": "4337ddf58d28dbdee4e1367bf71ee13393ab9820" }, "require": { "ext-mbstring": "*", "php": ">=5.5.9", "squizlabs/php_codesniffer": "^3.4.1", - "symfony/yaml": ">=2.0.0" + "symfony/yaml": ">=2.0.5" }, "require-dev": { "phpunit/phpunit": ">=3.7 <6" @@ -3854,7 +3854,7 @@ "phpcs", "standards" ], - "time": "2019-05-24T11:44:05+00:00" + "time": "2019-08-09T09:27:26+00:00" }, { "name": "fabpot/goutte", diff --git a/core/includes/batch.inc b/core/includes/batch.inc index 90001eb23b17..23599e1279bb 100644 --- a/core/includes/batch.inc +++ b/core/includes/batch.inc @@ -364,7 +364,7 @@ function _batch_process() { // If possible, estimate remaining processing time. '@estimate' => ($current > 0) ? \Drupal::service('date.formatter')->formatInterval(($elapsed * ($total - $current) / $current) / 1000) : '-', ]; - $message = strtr($progress_message, $values); + $message = strtr($progress_message, $values); return [$percentage, $message, $task_message]; } diff --git a/core/lib/Drupal/Core/Form/FormBuilderInterface.php b/core/lib/Drupal/Core/Form/FormBuilderInterface.php index 6b6ed83046b0..66f75d802279 100644 --- a/core/lib/Drupal/Core/Form/FormBuilderInterface.php +++ b/core/lib/Drupal/Core/Form/FormBuilderInterface.php @@ -136,6 +136,19 @@ public function rebuildForm($form_id, FormStateInterface &$form_state, $old_form * There is no return value, but you can check to see if there are errors * by calling $form_state->getErrors(). * + * For example: + * @code + * // register a new user + * $form_state = new FormState(); + * $values['name'] = 'robo-user'; + * $values['mail'] = 'robouser@example.com'; + * $values['pass']['pass1'] = 'password'; + * $values['pass']['pass2'] = 'password'; + * $values['op'] = t('Create new account'); + * $form_state->setValues($values); + * \Drupal::formBuilder()->submitForm('user_register_form', $form_state); + * @endcode + * * @param \Drupal\Core\Form\FormInterface|string $form_arg * The value must be one of the following: * - The name of a class that implements \Drupal\Core\Form\FormInterface. @@ -167,18 +180,6 @@ public function rebuildForm($form_id, FormStateInterface &$form_state, $old_form * $form_state->addBuildInfo('args', [&$object]); * \Drupal::formBuilder()->submitForm('mymodule_form', $form_state); * @endcode - * For example: - * @code - * // register a new user - * $form_state = new FormState(); - * $values['name'] = 'robo-user'; - * $values['mail'] = 'robouser@example.com'; - * $values['pass']['pass1'] = 'password'; - * $values['pass']['pass2'] = 'password'; - * $values['op'] = t('Create new account'); - * $form_state->setValues($values); - * \Drupal::formBuilder()->submitForm('user_register_form', $form_state); - * @endcode */ public function submitForm($form_arg, FormStateInterface &$form_state); diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php index 95464d141582..11be61de96ed 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php @@ -189,13 +189,13 @@ public function testStateChangedPreviousRevisionDuringSync() { */ protected function getAllRevisionNames(EntityTestMulRevPub $entity) { $storage = $this->container->get('entity_type.manager')->getStorage('entity_test_mulrevpub'); - return array_map(function($revision_id) use ($storage) { + return array_map(function ($revision_id) use ($storage) { return $storage->loadRevision($revision_id)->name->value; }, array_keys($storage->getQuery() - ->allRevisions() - ->condition('id', $entity->id()) - ->sort('revision_id', 'ASC') - ->execute()) + ->allRevisions() + ->condition('id', $entity->id()) + ->sort('revision_id', 'ASC') + ->execute()) ); } diff --git a/core/modules/tour/src/Tests/TourTestBase.php b/core/modules/tour/src/Tests/TourTestBase.php index ae35dfd6be5a..24c25056ea53 100644 --- a/core/modules/tour/src/Tests/TourTestBase.php +++ b/core/modules/tour/src/Tests/TourTestBase.php @@ -19,9 +19,6 @@ abstract class TourTestBase extends WebTestBase { * Assert function to determine if tips rendered to the page * have a corresponding page element. * - * @param array $tips - * A list of tips which provide either a "data-id" or "data-class". - * * @code * // Basic example. * $this->assertTourTips(); @@ -34,6 +31,9 @@ abstract class TourTestBase extends WebTestBase { * $tips[] = array('data-class' => 'baz'); * $this->assertTourTips($tips); * @endcode + * + * @param array $tips + * A list of tips which provide either a "data-id" or "data-class". */ public function assertTourTips($tips = []) { // Get the rendered tips and their data-id and data-class attributes. diff --git a/core/modules/tour/tests/src/Functional/TourTestBase.php b/core/modules/tour/tests/src/Functional/TourTestBase.php index 6274a8b941e3..6c1a898e2a7b 100644 --- a/core/modules/tour/tests/src/Functional/TourTestBase.php +++ b/core/modules/tour/tests/src/Functional/TourTestBase.php @@ -14,9 +14,6 @@ abstract class TourTestBase extends BrowserTestBase { * Assert function to determine if tips rendered to the page * have a corresponding page element. * - * @param array $tips - * A list of tips which provide either a "data-id" or "data-class". - * * @code * // Basic example. * $this->assertTourTips(); @@ -29,6 +26,9 @@ abstract class TourTestBase extends BrowserTestBase { * $tips[] = array('data-class' => 'baz'); * $this->assertTourTips($tips); * @endcode + * + * @param array $tips + * A list of tips which provide either a "data-id" or "data-class". */ public function assertTourTips($tips = []) { // Get the rendered tips and their data-id and data-class attributes. diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 6fa30859b94d..81cd2c369e20 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -80,6 +80,7 @@ <rule ref="Drupal.Commenting.VariableComment"> <!-- Sniff for: DuplicateVar, EmptyVar, InlineVariableName --> <exclude name="Drupal.Commenting.VariableComment.IncorrectVarType"/> + <exclude name="Drupal.Commenting.VariableComment.Missing"/> <exclude name="Drupal.Commenting.VariableComment.MissingVar"/> <exclude name="Drupal.Commenting.VariableComment.VarOrder"/> <exclude name="Drupal.Commenting.VariableComment.WrongStyle"/> -- GitLab