From e841a73c9d7d99eb1dee377c585399bddc398551 Mon Sep 17 00:00:00 2001 From: "kunal.sachdev" <kunal.sachdev@3685163.no-reply.drupal.org> Date: Thu, 17 Feb 2022 16:12:19 +0000 Subject: [PATCH] Issue #3258590 by kunal.sachdev: Various method missing return types --- package_manager/src/Event/PreOperationStageEvent.php | 2 +- .../package_manager_bypass/src/InvocationRecorderBase.php | 2 +- src/Event/ReadinessCheckEvent.php | 2 +- tests/src/Functional/UpdateLockTest.php | 2 +- tests/src/Functional/UpdaterFormTest.php | 2 +- tests/src/Kernel/UpdaterTest.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package_manager/src/Event/PreOperationStageEvent.php b/package_manager/src/Event/PreOperationStageEvent.php index e60ef7b28c..226af627bd 100644 --- a/package_manager/src/Event/PreOperationStageEvent.php +++ b/package_manager/src/Event/PreOperationStageEvent.php @@ -39,7 +39,7 @@ abstract class PreOperationStageEvent extends StageEvent { /** * Adds error information to the event. */ - public function addError(array $messages, ?TranslatableMarkup $summary = NULL) { + public function addError(array $messages, ?TranslatableMarkup $summary = NULL): void { $this->results[] = ValidationResult::createError($messages, $summary); } diff --git a/package_manager/tests/modules/package_manager_bypass/src/InvocationRecorderBase.php b/package_manager/tests/modules/package_manager_bypass/src/InvocationRecorderBase.php index feb4dc92f6..edc1075a9a 100644 --- a/package_manager/tests/modules/package_manager_bypass/src/InvocationRecorderBase.php +++ b/package_manager/tests/modules/package_manager_bypass/src/InvocationRecorderBase.php @@ -27,7 +27,7 @@ abstract class InvocationRecorderBase { * @param mixed ...$arguments * The arguments that the main class method was called with. */ - protected function saveInvocationArguments(...$arguments) { + protected function saveInvocationArguments(...$arguments): void { $invocations = $this->getInvocationArguments(); $invocations[] = $arguments; \Drupal::state()->set(static::class, $invocations); diff --git a/src/Event/ReadinessCheckEvent.php b/src/Event/ReadinessCheckEvent.php index e004988cd7..e42adf8090 100644 --- a/src/Event/ReadinessCheckEvent.php +++ b/src/Event/ReadinessCheckEvent.php @@ -66,7 +66,7 @@ class ReadinessCheckEvent extends PreOperationStageEvent { /** * Adds warning information to the event. */ - public function addWarning(array $messages, ?TranslatableMarkup $summary = NULL) { + public function addWarning(array $messages, ?TranslatableMarkup $summary = NULL): void { $this->results[] = ValidationResult::createWarning($messages, $summary); } diff --git a/tests/src/Functional/UpdateLockTest.php b/tests/src/Functional/UpdateLockTest.php index 73d87d98b3..1f8a13d25d 100644 --- a/tests/src/Functional/UpdateLockTest.php +++ b/tests/src/Functional/UpdateLockTest.php @@ -37,7 +37,7 @@ class UpdateLockTest extends AutomaticUpdatesFunctionalTestBase { /** * Tests that only user who started an update can continue through it. */ - public function testLock() { + public function testLock(): void { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); $this->setCoreVersion('9.8.0'); diff --git a/tests/src/Functional/UpdaterFormTest.php b/tests/src/Functional/UpdaterFormTest.php index 8e762d7a53..c68f84dcba 100644 --- a/tests/src/Functional/UpdaterFormTest.php +++ b/tests/src/Functional/UpdaterFormTest.php @@ -238,7 +238,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase { /** * Tests deleting an existing update. */ - public function testDeleteExistingUpdate() { + public function testDeleteExistingUpdate(): void { $conflict_message = 'Cannot begin an update because another Composer operation is currently in progress.'; $assert_session = $this->assertSession(); diff --git a/tests/src/Kernel/UpdaterTest.php b/tests/src/Kernel/UpdaterTest.php index 0d678d9c00..f48cb59281 100644 --- a/tests/src/Kernel/UpdaterTest.php +++ b/tests/src/Kernel/UpdaterTest.php @@ -33,7 +33,7 @@ class UpdaterTest extends AutomaticUpdatesKernelTestBase { /** * Tests that correct versions are staged after calling ::begin(). */ - public function testCorrectVersionsStaged() { + public function testCorrectVersionsStaged(): void { $this->setReleaseMetadata(__DIR__ . '/../../fixtures/release-history/drupal.9.8.1-security.xml'); // Create a user who will own the stage even after the container is rebuilt. -- GitLab