diff --git a/automatic_updates_extensions/tests/src/Build/ModuleUpdateTest.php b/automatic_updates_extensions/tests/src/Build/ModuleUpdateTest.php
index f5821cb68e36606f2fc6e1cf42dc730483830ccd..55e122bb50011dbea91b4598fad3fa61be8488ea 100644
--- a/automatic_updates_extensions/tests/src/Build/ModuleUpdateTest.php
+++ b/automatic_updates_extensions/tests/src/Build/ModuleUpdateTest.php
@@ -101,7 +101,7 @@ END;
   /**
    * Tests updating a module in a staging area via the UI.
    */
-  public function testUi() {
+  public function testUi(): void {
     $this->createTestProject('RecommendedProject');
 
     $mink = $this->getMink();
@@ -154,7 +154,7 @@ END;
    * @param string $version
    *   The expected version.
    */
-  private function assertModuleVersion(string $module_name, string $version) {
+  private function assertModuleVersion(string $module_name, string $version): void {
     $web_root = $this->getWebRoot();
     $composer_json = file_get_contents("$web_root/modules/contrib/$module_name/composer.json");
     $data = json_decode($composer_json, TRUE);
diff --git a/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php b/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
index 70d5ce61b259f1926a9e8eb1efa75292c01050b4..506766d69031c4d47f9ac67820d760572619571d 100644
--- a/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
+++ b/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
@@ -47,7 +47,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
    * @return array[]
    *   The test cases.
    */
-  public function providerSuccessfulUpdate() {
+  public function providerSuccessfulUpdate(): array {
     return [
       'maintenance mode on, semver' => [TRUE, 'semver_test', '8.1.0', '8.1.1'],
       'maintenance mode off, legacy' => [FALSE, 'aaa_update_test', '8.x-2.0', '8.x-2.1'],
@@ -82,7 +82,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
    * @todo This is copied from core. We need to file a core issue so we do not
    *    have to copy this.
    */
-  protected function setProjectInstalledVersion($project_versions) {
+  protected function setProjectInstalledVersion($project_versions): void {
     $this->config('update.settings')
       ->set('fetch.url', $this->baseUrl . '/test-release-history')
       ->save();
diff --git a/package_manager/tests/modules/package_manager_test_validation/src/EventSubscriber/TestSubscriber.php b/package_manager/tests/modules/package_manager_test_validation/src/EventSubscriber/TestSubscriber.php
index ca317f0f7e4584489ca1d7705a75639d678522e4..ca31d2d13d996622b1b0a85bf314b7850c837c8f 100644
--- a/package_manager/tests/modules/package_manager_test_validation/src/EventSubscriber/TestSubscriber.php
+++ b/package_manager/tests/modules/package_manager_test_validation/src/EventSubscriber/TestSubscriber.php
@@ -112,7 +112,7 @@ class TestSubscriber implements EventSubscriberInterface {
    * @return string
    *   The state key under which to store the results for the given event.
    */
-  protected static function getStateKey(string $event) {
+  protected static function getStateKey(string $event): string {
     $parts = explode('\\', $event);
     return static::STATE_KEY . array_pop($parts);
   }
diff --git a/src/BatchProcessor.php b/src/BatchProcessor.php
index e37fafce452a77e78e54de73724102c0087a9230..935f8c09e6bd414dafb6ae00ea4751e3d03fcf7f 100644
--- a/src/BatchProcessor.php
+++ b/src/BatchProcessor.php
@@ -264,7 +264,7 @@ final class BatchProcessor {
    * @see \Drupal\update\Form\UpdateReady::submitForm()
    * @see automatic_updates_batch_alter()
    */
-  public static function dbUpdateBatchFinished(bool $success, array $results, array $operations) {
+  public static function dbUpdateBatchFinished(bool $success, array $results, array $operations): void {
     DbUpdateController::batchFinished($success, $results, $operations);
     // Now that the update is done, we can put the site back online if it was
     // previously not in maintenance mode.
diff --git a/tests/modules/automatic_updates_test/src/StagedDatabaseUpdateValidator.php b/tests/modules/automatic_updates_test/src/StagedDatabaseUpdateValidator.php
index 34d1b0ca1298a7d77c562d3232e9dd2b2e5f4015..e2abcea63e7a3b1936c448d5e59617e417bb56ee 100644
--- a/tests/modules/automatic_updates_test/src/StagedDatabaseUpdateValidator.php
+++ b/tests/modules/automatic_updates_test/src/StagedDatabaseUpdateValidator.php
@@ -25,7 +25,7 @@ class StagedDatabaseUpdateValidator extends BaseValidator {
    * @param \Drupal\Core\State\StateInterface $state
    *   The state service.
    */
-  public function setState(StateInterface $state) {
+  public function setState(StateInterface $state): void {
     $this->state = $state;
   }
 
diff --git a/tests/modules/automatic_updates_test_disable_validators/src/AutomaticUpdatesTestDisableValidatorsServiceProvider.php b/tests/modules/automatic_updates_test_disable_validators/src/AutomaticUpdatesTestDisableValidatorsServiceProvider.php
index 1f009782b61d2b88b2064a407d4e101f17ab768e..f5da5371fb224a9519d6abe8f544a3e33f6e0765 100644
--- a/tests/modules/automatic_updates_test_disable_validators/src/AutomaticUpdatesTestDisableValidatorsServiceProvider.php
+++ b/tests/modules/automatic_updates_test_disable_validators/src/AutomaticUpdatesTestDisableValidatorsServiceProvider.php
@@ -14,7 +14,7 @@ class AutomaticUpdatesTestDisableValidatorsServiceProvider extends ServiceProvid
   /**
    * {@inheritdoc}
    */
-  public function alter(ContainerBuilder $container) {
+  public function alter(ContainerBuilder $container): void {
     parent::alter($container);
 
     $validators = Settings::get('automatic_updates_test_disable_validators', []);
diff --git a/tests/src/Build/CoreUpdateTest.php b/tests/src/Build/CoreUpdateTest.php
index 61e18bbe8501191f4913ea26fbbfd04abdea73fe..e5f58b29facd63c74a9ecbda819fc2b0d17adfa9 100644
--- a/tests/src/Build/CoreUpdateTest.php
+++ b/tests/src/Build/CoreUpdateTest.php
@@ -14,7 +14,7 @@ class CoreUpdateTest extends UpdateTestBase {
   /**
    * {@inheritdoc}
    */
-  public function copyCodebase(\Iterator $iterator = NULL, $working_dir = NULL) {
+  public function copyCodebase(\Iterator $iterator = NULL, $working_dir = NULL): void {
     parent::copyCodebase($iterator, $working_dir);
 
     // Ensure that we will install Drupal 9.8.0 (a fake version that should
diff --git a/tests/src/Functional/AutomaticUpdatesFunctionalTestBase.php b/tests/src/Functional/AutomaticUpdatesFunctionalTestBase.php
index 7109612ba2ca6496566ef005e2bb6b5778dc4ba9..9f056d460b38eb2c01dd7c64bb383f002ff77f96 100644
--- a/tests/src/Functional/AutomaticUpdatesFunctionalTestBase.php
+++ b/tests/src/Functional/AutomaticUpdatesFunctionalTestBase.php
@@ -41,7 +41,7 @@ abstract class AutomaticUpdatesFunctionalTestBase extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->disableValidators($this->disableValidators);
 
@@ -60,7 +60,7 @@ abstract class AutomaticUpdatesFunctionalTestBase extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function installModulesFromClassProperty(ContainerInterface $container) {
+  protected function installModulesFromClassProperty(ContainerInterface $container): void {
     $container->get('module_installer')->install([
       'automatic_updates_test_release_history',
     ]);
diff --git a/tests/src/Functional/UpdaterFormTest.php b/tests/src/Functional/UpdaterFormTest.php
index fbb86029c3fabae27f4d8b48d0153c79d1440a26..d58e1659885df5508c259c467556ee7958974ba9 100644
--- a/tests/src/Functional/UpdaterFormTest.php
+++ b/tests/src/Functional/UpdaterFormTest.php
@@ -427,7 +427,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
    * @return bool[][]
    *   The test cases.
    */
-  public function providerStagedDatabaseUpdates() {
+  public function providerStagedDatabaseUpdates(): array {
     return [
       'maintenance mode on' => [TRUE],
       'maintenance mode off' => [FALSE],
diff --git a/tests/src/Kernel/ProjectInfoTest.php b/tests/src/Kernel/ProjectInfoTest.php
index e2b6c3ed41530455da57e09cb3280a049bd5892c..e68bf344ce71a812b789570fb9a2cfa3499685b2 100644
--- a/tests/src/Kernel/ProjectInfoTest.php
+++ b/tests/src/Kernel/ProjectInfoTest.php
@@ -23,7 +23,7 @@ class ProjectInfoTest extends AutomaticUpdatesKernelTestBase {
    *
    * @dataProvider providerGetInstallableReleases
    */
-  public function testGetInstallableReleases(string $fixture, string $installed_version, array $expected_versions) {
+  public function testGetInstallableReleases(string $fixture, string $installed_version, array $expected_versions): void {
     [$project] = explode('.', $fixture);
     $fixtures_directory = __DIR__ . '/../../fixtures/release-history/';
     if ($project === 'drupal') {
@@ -60,7 +60,7 @@ class ProjectInfoTest extends AutomaticUpdatesKernelTestBase {
    * @return array[]
    *   The test cases.
    */
-  public function providerGetInstallableReleases() {
+  public function providerGetInstallableReleases(): array {
     return [
       'core, no updates' => [
         'drupal.9.8.2.xml',
@@ -122,7 +122,7 @@ class ProjectInfoTest extends AutomaticUpdatesKernelTestBase {
    *
    * @covers ::getInstallableReleases()
    */
-  public function testNotPublishedProject() {
+  public function testNotPublishedProject(): void {
     $this->setReleaseMetadata(['drupal' => __DIR__ . '/../../fixtures/release-history/drupal.9.8.2_unknown_status.xml']);
     $project_info = new ProjectInfo('drupal');
     $this->expectException('RuntimeException');
diff --git a/tests/src/Kernel/ReleaseChooserTest.php b/tests/src/Kernel/ReleaseChooserTest.php
index f158f7da52bb7eb19dec001acb2cceebf9571822..b3b2b692a1b38623a7bac644f7596953ebc6e6db 100644
--- a/tests/src/Kernel/ReleaseChooserTest.php
+++ b/tests/src/Kernel/ReleaseChooserTest.php
@@ -159,7 +159,7 @@ class ReleaseChooserTest extends AutomaticUpdatesKernelTestBase {
    * @param \Drupal\update\ProjectRelease|null $release
    *   The release to check, or NULL if no release is expected.
    */
-  private function assertReleaseVersion(?string $version, ?ProjectRelease $release) {
+  private function assertReleaseVersion(?string $version, ?ProjectRelease $release): void {
     if (is_null($version)) {
       $this->assertNull($release);
     }
diff --git a/tests/src/Unit/LegacyVersionUtilityTest.php b/tests/src/Unit/LegacyVersionUtilityTest.php
index 1d3da036bbd3cf15a6ee0ef7f59f7bcc6973934c..cfb4f1f4e7e9244cf640da28afc05e4a99872757 100644
--- a/tests/src/Unit/LegacyVersionUtilityTest.php
+++ b/tests/src/Unit/LegacyVersionUtilityTest.php
@@ -22,7 +22,7 @@ class LegacyVersionUtilityTest extends UnitTestCase {
    *
    * @dataProvider providerConvertToSemanticVersion
    */
-  public function testConvertToSemanticVersion(string $version_number, string $expected) {
+  public function testConvertToSemanticVersion(string $version_number, string $expected): void {
     $this->assertSame($expected, LegacyVersionUtility::convertToSemanticVersion($version_number));
   }
 
@@ -32,7 +32,7 @@ class LegacyVersionUtilityTest extends UnitTestCase {
    * @return string[][]
    *   The test cases.
    */
-  public function providerConvertToSemanticVersion() {
+  public function providerConvertToSemanticVersion(): array {
     return [
       '8.x-1.2' => ['8.x-1.2', '1.2.0'],
       '8.x-1.2-alpha1' => ['8.x-1.2-alpha1', '1.2.0-alpha1'],
@@ -51,7 +51,7 @@ class LegacyVersionUtilityTest extends UnitTestCase {
    *
    * @dataProvider providerConvertToLegacyVersion
    */
-  public function testConvertToLegacyVersion(string $version_number, ?string $expected) {
+  public function testConvertToLegacyVersion(string $version_number, ?string $expected): void {
     $this->assertSame($expected, LegacyVersionUtility::convertToLegacyVersion($version_number));
   }
 
@@ -61,7 +61,7 @@ class LegacyVersionUtilityTest extends UnitTestCase {
    * @return array[]
    *   The test cases.
    */
-  public function providerConvertToLegacyVersion() {
+  public function providerConvertToLegacyVersion(): array {
     return [
       '1.2.0' => ['1.2.0', '8.x-1.2'],
       '1.2.0-alpha1' => ['1.2.0-alpha1', '8.x-1.2-alpha1'],