diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php
index 627ff292e9ccaab4d8469d8d25300e6d8de06254..1d017a01cca901207101211e7f4184717af88038 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php
@@ -123,11 +123,11 @@ protected function setUp(): void {
   /**
    * Gets translation from locale storage.
    *
-   * @param $config_name
+   * @param string $config_name
    *   Configuration object.
-   * @param $key
+   * @param string $key
    *   Translation configuration field key.
-   * @param $langcode
+   * @param string $langcode
    *   String language code to load translation.
    *
    * @return bool|mixed
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
index 0be086e36bfc0f603d5e7971d2a03688608c35e0..2e9ed9e26617c966ed67b1b660fee1b8916a57af 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
@@ -551,7 +551,7 @@ protected function assertViolations(EntityConstraintViolationListInterface $viol
   /**
    * Asserts that the latest revision has the expected field values.
    *
-   * @param $entity_id
+   * @param string $entity_id
    *   The entity ID.
    * @param array $expected_values
    *   An array of expected values in the following order:
diff --git a/core/modules/field/tests/src/Functional/FieldTestBase.php b/core/modules/field/tests/src/Functional/FieldTestBase.php
index c419578a73bfa0586c7ef044b6cab88f6cee2195..112cbb827a1c4ca19dc5c3212b588b5c4e2883d8 100644
--- a/core/modules/field/tests/src/Functional/FieldTestBase.php
+++ b/core/modules/field/tests/src/Functional/FieldTestBase.php
@@ -16,7 +16,7 @@ abstract class FieldTestBase extends BrowserTestBase {
   /**
    * Generate random values for a field_test field.
    *
-   * @param $cardinality
+   * @param int $cardinality
    *   Number of values to generate.
    *
    * @return array
@@ -38,14 +38,14 @@ public function _generateTestFieldValues($cardinality) {
    *
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   The entity to test.
-   * @param $field_name
+   * @param string $field_name
    *   The name of the field to test
-   * @param $expected_values
+   * @param array $expected_values
    *   The array of expected values.
-   * @param $langcode
+   * @param string $langcode
    *   (Optional) The language code for the values. Defaults to
    *   \Drupal\Core\Language\LanguageInterface::LANGCODE_DEFAULT.
-   * @param $column
+   * @param string $column
    *   (Optional) The name of the column to check. Defaults to 'value'.
    */
   public function assertFieldValues(EntityInterface $entity, $field_name, $expected_values, $langcode = LanguageInterface::LANGCODE_DEFAULT, $column = 'value') {
diff --git a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
index 599ad85290de45698369956df3e15b000bdeea73..c31906ee26662437ae2384b5745375a8f6b68aa4 100644
--- a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
@@ -54,11 +54,11 @@ class BulkDeleteTest extends FieldKernelTestBase {
   /**
    * Tests that the expected hooks have been invoked on the expected entities.
    *
-   * @param $expected_hooks
+   * @param string[] $expected_hooks
    *   An array keyed by hook name, with one entry per expected invocation.
    *   Each entry is the value of the "$entity" parameter the hook is expected
    *   to have been passed.
-   * @param $actual_hooks
+   * @param array $actual_hooks
    *   The array of actual hook invocations recorded by field_test_memorize().
    */
   public function checkHooksInvocations($expected_hooks, $actual_hooks): void {
diff --git a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
index 28c8d85b768564046b8e5621399ef4ffc73e93a7..5e2b060e7b4a29e50ce6c36ca3be5618dbe21748 100644
--- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
+++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
@@ -165,7 +165,7 @@ protected function entityValidateAndSave(EntityInterface $entity) {
   /**
    * Generate random values for a field_test field.
    *
-   * @param $cardinality
+   * @param int $cardinality
    *   Number of values to generate.
    *
    * @return array
@@ -187,14 +187,14 @@ protected function _generateTestFieldValues($cardinality) {
    *
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   The entity to test.
-   * @param $field_name
+   * @param string $field_name
    *   The name of the field to test
-   * @param $expected_values
+   * @param array $expected_values
    *   The array of expected values.
-   * @param $langcode
+   * @param string $langcode
    *   (Optional) The language code for the values. Defaults to
    *   \Drupal\Core\Language\LanguageInterface::LANGCODE_NOT_SPECIFIED.
-   * @param $column
+   * @param string $column
    *   (Optional) The name of the column to check. Defaults to 'value'.
    */
   protected function assertFieldValues(EntityInterface $entity, $field_name, $expected_values, $langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED, $column = 'value') {
diff --git a/core/modules/file/tests/src/Functional/FileFieldTestBase.php b/core/modules/file/tests/src/Functional/FileFieldTestBase.php
index 8d930fea9cab1478439615b4bb6673f2100cd911..d6e1b28a0198932892888047bcb7172c905e9a02 100644
--- a/core/modules/file/tests/src/Functional/FileFieldTestBase.php
+++ b/core/modules/file/tests/src/Functional/FileFieldTestBase.php
@@ -104,7 +104,7 @@ public function updateFileField($name, $type_name, $field_settings = [], $widget
    *   The File to be uploaded.
    * @param string $field_name
    *   The name of the field on which the files should be saved.
-   * @param $nid_or_type
+   * @param int|string $nid_or_type
    *   A numeric node id to upload files to an existing node, or a string
    *   indicating the desired bundle for a new node.
    * @param bool $new_revision
@@ -126,7 +126,7 @@ public function uploadNodeFile(FileInterface $file, $field_name, $nid_or_type, $
    *   The files to be uploaded.
    * @param string $field_name
    *   The name of the field on which the files should be saved.
-   * @param $nid_or_type
+   * @param int|string $nid_or_type
    *   A numeric node id to upload files to an existing node, or a string
    *   indicating the desired bundle for a new node.
    * @param bool $new_revision
diff --git a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
index da98d02866a25d7ed8a089233f97c508781b3d22..f2b1f52fa6794e58bfb72cc1dee2d8979cd275c3 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
@@ -94,13 +94,13 @@ public function previewNodeImage($image, $field_name, $type) {
   /**
    * Upload an image to a node.
    *
-   * @param $image
+   * @param \stdClass $image
    *   A file object representing the image to upload.
-   * @param $field_name
+   * @param string $field_name
    *   Name of the image field the image should be attached to.
-   * @param $type
+   * @param string $type
    *   The type of node to create.
-   * @param $alt
+   * @param string $alt
    *   The alt text for the image. Use if the field settings require alt text.
    */
   public function uploadNodeImage($image, $field_name, $type, $alt = '') {
diff --git a/core/modules/link/tests/src/Functional/LinkFieldUITest.php b/core/modules/link/tests/src/Functional/LinkFieldUITest.php
index 56367d8b9ac5670f114fce8b6aa56f51586d7260..694fb6b3677462b6d7941725a13a95fd7b0d5641 100644
--- a/core/modules/link/tests/src/Functional/LinkFieldUITest.php
+++ b/core/modules/link/tests/src/Functional/LinkFieldUITest.php
@@ -243,7 +243,7 @@ protected function assertNoFieldContainsRawText(string $field_name, string $text
   /**
    * Returns the raw HTML for the given field.
    *
-   * @param $field_name
+   * @param string $field_name
    *   The name of the field for which to return the HTML.
    *
    * @return string
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
index f4234aa900b6f7f5872fbeac9f167f3e9cf7c104..e3bc8fe28989632d91b5cacc6a8a8c8eca50590d 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
@@ -251,7 +251,7 @@ protected function mockFailure($migration, array $row, $status = MigrateIdMapInt
   /**
    * Gets the migration plugin.
    *
-   * @param $plugin_id
+   * @param string $plugin_id
    *   The plugin ID of the migration to get.
    *
    * @return \Drupal\migrate\Plugin\Migration
diff --git a/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php b/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
index 3885c1cb798728eaad16249bb2da76396e3d43cc..9dc36ebc10b01c0078429afe5bc5a79aab2d461d 100644
--- a/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
+++ b/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
@@ -181,7 +181,7 @@ public function testSave(): void {
    *
    * @see \Drupal\Tests\migrate\Unit\Destination\EntityRevision
    *
-   * @param $configuration
+   * @param array $configuration
    *   Configuration for the destination.
    * @param string $plugin_id
    *   The plugin id.
diff --git a/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php b/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php
index b23b6026b692fece506bba6315eccf202b398a0a..830edec70fc9526042066119136647af12a2aaef 100644
--- a/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php
@@ -26,10 +26,10 @@ class FileCopyTest extends MigrateProcessTestCase {
    *
    * @param array $configuration
    *   The plugin configuration.
-   * @param $expected
+   * @param \Drupal\Core\File\FileExists $expected
    *   The expected value of the plugin configuration.
    */
-  public function testFileProcessBaseConstructor($configuration, $expected): void {
+  public function testFileProcessBaseConstructor(array $configuration, FileExists $expected): void {
     $this->assertPlugin($configuration, $expected);
   }
 
diff --git a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php
index 0f0408aaa50dd6129f0c1fde09cde16cae8adf2c..23d0dfb494d75d83a5df05a07446fdb2b3af0d69 100644
--- a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php
@@ -83,11 +83,11 @@ public function testMigrateExceptionUnexpectedValue(): void {
    *
    * @dataProvider datesDataProvider
    *
-   * @param $configuration
+   * @param array $configuration
    *   The configuration of the migration process plugin.
-   * @param $value
+   * @param string $value
    *   The source value for the migration process plugin.
-   * @param $expected
+   * @param string $expected
    *   The expected value of the migration process plugin.
    */
   public function testTransform($configuration, $value, $expected): void {
diff --git a/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php b/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
index db6977df8dfd1a6fa39065fa0625db9d240141dd..933a328f8d920e47757f3a137a27d966113f2e20 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
@@ -120,7 +120,7 @@ public function testNodeAccessLanguageFallback(): void {
    * @param int $count
    *   The number of rows expected by the query (equal to the translation
    *   count).
-   * @param $langcode
+   * @param string $langcode
    *   The expected language code set as the fallback property.
    */
   public function checkRecords($count, $langcode = 'hu'): void {
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
index 6ed7ffda85e4c51b255ab3d5750b86451b21ba74..f4059ceb87488bcd1faf18b2a340a5f1ed286efe 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
@@ -467,7 +467,7 @@ public function testRevisionTranslationRevert(): void {
    *
    * @param \Drupal\node\NodeInterface $node
    *   The node object.
-   * @param $count
+   * @param int $count
    *   The number of revisions to be created.
    */
   protected function createRevisions(NodeInterface $node, $count): void {
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
index 9e9f7bb89910b23813276fdea34c32bd02405e64..bb717da2a69fe1165038810e3ced729618f7172f 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -1445,9 +1445,9 @@ protected function assertStoredEntityMatchesSentNormalization(array $sent_normal
    * A response may include more properties, we only need to ensure that all
    * items in the request exist in the response.
    *
-   * @param $expected
+   * @param array $expected
    *   An array of expected values, may contain further nested arrays.
-   * @param $actual
+   * @param array $actual
    *   The object to test.
    */
   protected function assertEntityArraySubset($expected, $actual) {
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php
index 819d91383beb8905a516e206c3baabf5f13912ca..3e8da705c831a228ae31bb7ccfd74671df0b9a94 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php
@@ -122,7 +122,7 @@ public function testNormalizeWithAccountContext(): void {
   /**
    * Creates a mock content entity.
    *
-   * @param $definitions
+   * @param array $definitions
    *   The properties the will be returned.
    *
    * @return \PHPUnit\Framework\MockObject\MockObject
diff --git a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
index 405dada8ff0e46051ec2728861b9b4a92a832374..2c09e1ef0a40523b2b81d87878f63f7a8714eb05 100644
--- a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
+++ b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
@@ -220,7 +220,7 @@ public function testBatchLargePercentage(): void {
   /**
    * Triggers a pass if the texts were found in order in the raw content.
    *
-   * @param $texts
+   * @param array $texts
    *   Array of raw strings to look for.
    *
    * @internal
diff --git a/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php b/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php
index e09f46771968282d4d2bf70a57bc8d0f9b0a3643..56ceaae71afd29f1133ce0322dea33fe2fdac44f 100644
--- a/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php
+++ b/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php
@@ -18,11 +18,11 @@ abstract class CacheTestBase extends BrowserTestBase {
   /**
    * Checks whether or not a cache entry exists.
    *
-   * @param $cid
+   * @param string $cid
    *   The cache id.
-   * @param $var
+   * @param mixed $var
    *   The variable the cache should contain.
-   * @param $bin
+   * @param string|null $bin
    *   The bin the cache item was stored in.
    *
    * @return bool
@@ -41,13 +41,13 @@ protected function checkCacheExists($cid, $var, $bin = NULL): bool {
   /**
    * Asserts that a cache entry exists.
    *
-   * @param $message
+   * @param string $message
    *   Message to display.
-   * @param $var
+   * @param string|null $var
    *   The variable the cache should contain.
-   * @param $cid
+   * @param string|null $cid
    *   The cache id.
-   * @param $bin
+   * @param string|null $bin
    *   The bin the cache item was stored in.
    */
   protected function assertCacheExists($message, $var = NULL, $cid = NULL, $bin = NULL) {
@@ -67,11 +67,11 @@ protected function assertCacheExists($message, $var = NULL, $cid = NULL, $bin =
   /**
    * Asserts that a cache entry has been removed.
    *
-   * @param $message
+   * @param string $message
    *   Message to display.
-   * @param $cid
+   * @param string|null $cid
    *   The cache id.
-   * @param $bin
+   * @param string|null $bin
    *   The bin the cache item was stored in.
    */
   public function assertCacheRemoved($message, $cid = NULL, $bin = NULL) {
diff --git a/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php b/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php
index 1039c86f46dd069e33fd412540290c51d25c9924..553292a8d31d1c3f35158d1f2561b258866c59ec 100644
--- a/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php
+++ b/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php
@@ -31,7 +31,7 @@ trait AssertBreadcrumbTrait {
    *   (optional) An associative array whose keys are link paths and whose
    *   values are link titles (not sanitized) of an expected active trail in a
    *   menu tree output on the page.
-   * @param $last_active
+   * @param bool $last_active
    *   (optional) Whether the last link in $tree is expected to be active (TRUE)
    *   or just to be in the active trail (FALSE).
    * @param string $active_trail_class
diff --git a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php
index d73c75f7e8da1dbc5a55e1ce23fc404b5b60c15b..a5a34cc2630ef3a190fdf22c51bca836f8c3478b 100644
--- a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php
+++ b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Assert that all tables defined in a module's hook_schema() exist.
    *
-   * @param $module
+   * @param string $module
    *   The name of the module.
    */
   public function assertModuleTablesExist($module) {
@@ -57,7 +57,7 @@ public function assertModuleTablesExist($module) {
   /**
    * Assert that none of the tables defined in a module's hook_schema() exist.
    *
-   * @param $module
+   * @param string $module
    *   The name of the module.
    */
   public function assertModuleTablesDoNotExist($module) {
@@ -127,9 +127,9 @@ public function assertNoModuleConfig($module) {
   /**
    * Assert the list of modules are enabled or disabled.
    *
-   * @param $modules
+   * @param array $modules
    *   Module list to check.
-   * @param $enabled
+   * @param bool $enabled
    *   Expected module state.
    */
   public function assertModules(array $modules, $enabled) {
@@ -148,21 +148,21 @@ public function assertModules(array $modules, $enabled) {
   /**
    * Verify a log entry was entered for a module's status change.
    *
-   * @param $type
+   * @param string $type
    *   The category to which this message belongs.
-   * @param $message
+   * @param string $message
    *   The message to store in the log. Keep $message translatable
    *   by not concatenating dynamic values into it! Variables in the
    *   message should be added by using placeholder strings alongside
    *   the variables argument to declare the value of the placeholders.
    *   See t() for documentation on how $message and $variables interact.
-   * @param $variables
+   * @param array $variables
    *   Array of variables to replace in the message on display or
    *   NULL if message is already translated or not possible to
    *   translate.
-   * @param $severity
+   * @param int $severity
    *   The severity of the message, as per RFC 3164.
-   * @param $link
+   * @param string $link
    *   A link to associate with the message.
    */
   public function assertLogMessage($type, $message, $variables = [], $severity = RfcLogLevel::NOTICE, $link = '') {
diff --git a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
index cc7052344d0dc787925665d67628f8ac5ff1c4f1..f3fe2c10cdd66f3b46124f89bc85bb0931ac86f5 100644
--- a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
+++ b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
@@ -268,7 +268,7 @@ protected function assertSessionIds(string $sid, string $assertion_text): void {
   /**
    * Builds a URL for submitting a mock HTTPS request to HTTP test environments.
    *
-   * @param $url
+   * @param string $url
    *   A Drupal path such as 'user/login'.
    *
    * @return string
@@ -281,7 +281,7 @@ protected function httpsUrl($url): string {
   /**
    * Builds a URL for submitting a mock HTTP request to HTTPS test environments.
    *
-   * @param $url
+   * @param string $url
    *   A Drupal path such as 'user/login'.
    *
    * @return string
diff --git a/core/modules/system/tests/src/Kernel/Common/UrlTest.php b/core/modules/system/tests/src/Kernel/Common/UrlTest.php
index f58f4f6eea4763d702634e81c86af7ea6ecd28d1..3d7dacc402700f00c71133966fe5e50dfecdb9cd 100644
--- a/core/modules/system/tests/src/Kernel/Common/UrlTest.php
+++ b/core/modules/system/tests/src/Kernel/Common/UrlTest.php
@@ -168,11 +168,11 @@ public function testLinkRenderArrayText(): void {
   /**
    * Checks for class existence in link.
    *
-   * @param $attribute
+   * @param string $attribute
    *   Attribute to be checked.
-   * @param $link
+   * @param string $link
    *   URL to search.
-   * @param $class
+   * @param string $class
    *   Element class to search for.
    *
    * @return bool
diff --git a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
index 3f049a2b24bb88b16a6ea1230bd3d225e9a91f0f..a300066cc48c86db22ad8e08732707f588a71cee 100644
--- a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
@@ -58,9 +58,9 @@ public function testSubmissionWorkflow(): void {
   /**
    * Programmatically submits the form_test.module form with the given values.
    *
-   * @param $values
+   * @param array $values
    *   An array of field values to be submitted.
-   * @param $valid_input
+   * @param bool $valid_input
    *   A boolean indicating whether or not the form submission is expected to
    *   be valid.
    */
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php
index 2fa4229480a771861e1e95f5fc38d0329fc1ca0c..a60cff4d797ff937aa73dcb143b304c727c12ab3 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php
@@ -30,9 +30,9 @@ protected function setUp(): void {
    *   The menu ID.
    * @param string $language
    *   The menu language.
-   * @param $label
+   * @param string $label
    *   The menu label.
-   * @param $description
+   * @param string $description
    *   The menu description.
    *
    * @internal
diff --git a/core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php b/core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php
index ed3dce647b3eb85755ab16c7bf3d1739f4c92bf5..02c6e11d08783179f420235f19446382d73a371d 100644
--- a/core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php
+++ b/core/modules/system/tests/src/Unit/Mail/HtmlToTextTest.php
@@ -28,7 +28,7 @@ public function setUp(): void {
   /**
    * Converts a string to its PHP source equivalent for display in test messages.
    *
-   * @param $text
+   * @param string $text
    *   The text string to convert.
    *
    * @return string
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
index 8f458a4bcfbdb4a9b3666fcfe964ddc03df604bf..f4c4d0b1d5e81868bcbb959d95b5e53c31ce4c69 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
@@ -65,9 +65,9 @@ protected function setUp(): void {
    *   Entity ID to load and check.
    * @param string $expected_language
    *   The language code for this term.
-   * @param $expected_label
+   * @param string $expected_label
    *   The label the migrated entity should have.
-   * @param $expected_vid
+   * @param string $expected_vid
    *   The parent vocabulary the migrated entity should have.
    * @param string|null $expected_description
    *   The description the migrated entity should have.
@@ -204,7 +204,7 @@ public function testTaxonomyTerms(): void {
   /**
    * Retrieves the parent term IDs for a given term.
    *
-   * @param $tid
+   * @param int $tid
    *   ID of the term to check.
    *
    * @return array
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
index 3cde0fb5485ab57d27b514693351bdec319ca8da..e56fe67c481643957ed8cdf9137e270743d1a3d2 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
@@ -33,11 +33,11 @@ protected function setUp(): void {
    *
    * @param string $id
    *   Entity ID to load and check.
-   * @param $expected_label
+   * @param string $expected_label
    *   The label the migrated entity should have.
-   * @param $expected_description
+   * @param string $expected_description
    *   The description the migrated entity should have.
-   * @param $expected_weight
+   * @param string $expected_weight
    *   The weight the migrated entity should have.
    *
    * @internal
diff --git a/core/modules/update/tests/src/Functional/UpdateTestBase.php b/core/modules/update/tests/src/Functional/UpdateTestBase.php
index f9afb144f00fb125c5ca468ba8d01a90ac961275..67848f65001f42476548499242d8784ea222c016 100644
--- a/core/modules/update/tests/src/Functional/UpdateTestBase.php
+++ b/core/modules/update/tests/src/Functional/UpdateTestBase.php
@@ -64,10 +64,10 @@ abstract class UpdateTestBase extends BrowserTestBase {
   /**
    * Refreshes the update status based on the desired available update scenario.
    *
-   * @param $xml_map
+   * @param array $xml_map
    *   Array that maps project names to availability scenarios to fetch. The key
    *   '#all' is used if a project-specific mapping is not defined.
-   * @param $url
+   * @param string $url
    *   (optional) A string containing the URL to fetch update data from.
    *   Defaults to 'update-test'.
    *
diff --git a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
index 9daa58d976083717b63901f0d139b5af112731a4..cdaa10c90d3d8de0cdf7c0fcc20dd67075ed8258 100644
--- a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
@@ -211,9 +211,9 @@ public function testPathDestination(): void {
    * various views listing pages, and they might have tokens in them. So we
    * need special code to find the correct one to click.
    *
-   * @param $label
+   * @param string $label
    *   Text between the anchor tags of the desired link.
-   * @param $unique_href_part
+   * @param string $unique_href_part
    *   A unique string that is expected to occur within the href of the desired
    *   link. For example, if the link URL is expected to look like
    *   "admin/structure/views/view/glossary/*", then "/glossary/" could be
diff --git a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
index fa2981eb03f09ee15bbbc1c94e8c074b11edd66e..b1fea7d324aa460cb6fe2c9dbd40ee30565198e8 100644
--- a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
+++ b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
@@ -498,7 +498,7 @@ protected function findAvailablePort(): int {
   /**
    * Checks whether a port is available.
    *
-   * @param $port
+   * @param int $port
    *   A number between 1024 and 65536.
    *
    * @return bool
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
index d3f77f05f8de8c5e0ca700b0f83a035316f09921..7e6001aa16f75ec59922c1c0efe5f8cff8a4ad04 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
@@ -528,7 +528,7 @@ public function assertEscaped($raw) {
    * quotes respectively therefore we can not escape them when testing for
    * escaped HTML.
    *
-   * @param $raw
+   * @param string $raw
    *   The raw string to escape.
    *
    * @return string
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
index 9ff9b1d488cef22711bcea5d85594249aa187b63..b74d470822dce143c2672c10faa29fe5a31e305e 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
@@ -154,7 +154,7 @@ public function testEntitySaveRollback(): void {
    *
    * @param string[] $statements
    *   A list of query statements.
-   * @param $table_name
+   * @param string $table_name
    *   The name of the table to filter by.
    *
    * @return string[]
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
index 4d151aa0eca3175ad1aca34a9cd105fc8330351b..3c98668c9c26f5818fa5ccec35f3b81aaa4619e7 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
    * Module entity_crud_hook_test implements all core entity CRUD hooks and
    * stores a message for each in $GLOBALS['entity_crud_hook_test'].
    *
-   * @param array $messages
+   * @param string[] $messages
    *   An array of plain-text messages in the order they should appear.
    *
    * @internal
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
index 5308ea355f006f542a3d38b5907aa5f23405999a..d41860c72f92bf50a263c0965d4ebf0b9d932d79 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
@@ -79,11 +79,11 @@ protected function setUpFilesystem() {
   /**
    * Helper function to test the permissions of a file.
    *
-   * @param $filepath
+   * @param string $filepath
    *   String file path.
-   * @param $expected_mode
+   * @param int $expected_mode
    *   Octal integer like 0664 or 0777.
-   * @param $message
+   * @param string|null $message
    *   Optional message.
    */
   public function assertFilePermissions($filepath, $expected_mode, $message = NULL) {
@@ -114,11 +114,11 @@ public function assertFilePermissions($filepath, $expected_mode, $message = NULL
   /**
    * Helper function to test the permissions of a directory.
    *
-   * @param $directory
+   * @param string $directory
    *   String directory path.
-   * @param $expected_mode
+   * @param int $expected_mode
    *   Octal integer like 0664 or 0777.
-   * @param $message
+   * @param string|null $message
    *   Optional message.
    */
   public function assertDirectoryPermissions($directory, $expected_mode, $message = NULL) {
@@ -170,13 +170,13 @@ public function createDirectory($path = NULL) {
   /**
    * Create a file and return the URI of it.
    *
-   * @param $filepath
+   * @param string|null $filepath
    *   Optional string specifying the file path. If none is provided then a
    *   randomly named file will be created in the site's files directory.
-   * @param $contents
+   * @param string|null $contents
    *   Optional contents to save into the file. If a NULL value is provided an
    *   arbitrary string will be used.
-   * @param $scheme
+   * @param string|null $scheme
    *   Optional string indicating the stream scheme to use. Drupal core includes
    *   public, private, and temporary. The public wrapper is the default.
    *
diff --git a/core/tests/Drupal/Tests/Component/Graph/GraphTest.php b/core/tests/Drupal/Tests/Component/Graph/GraphTest.php
index ab600c4a6f00d4428061cad4b7449cf711ea776d..81810093dd00d2a906d138b666e8c17c77e40727 100644
--- a/core/tests/Drupal/Tests/Component/Graph/GraphTest.php
+++ b/core/tests/Drupal/Tests/Component/Graph/GraphTest.php
@@ -84,7 +84,7 @@ public function testDepthFirstSearch(): void {
   /**
    * Normalizes a graph.
    *
-   * @param $graph
+   * @param array $graph
    *   A graph array processed by \Drupal\Component\Graph\Graph::searchAndSort()
    *
    * @return array
@@ -186,9 +186,9 @@ protected function assertWeights(array $graph, array $expected_orders): void {
   /**
    * Helper function to output vertices as comma-separated list.
    *
-   * @param $paths
+   * @param array $paths
    *   An array containing a list of vertices.
-   * @param $keys
+   * @param bool $keys
    *   (optional) Whether to output the keys of $paths instead of the values.
    */
   protected function displayArray($paths, $keys = FALSE): string {
diff --git a/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php b/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php
index 23ddfea01197f67fb389df92cc5c10239c215480..21e8830fa89cdf69fc12304aa17ca3007da95390 100644
--- a/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php
+++ b/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php
@@ -19,9 +19,9 @@ class PlainTextOutputTest extends TestCase {
   /**
    * Tests ::renderFromHtml().
    *
-   * @param $expected
+   * @param string $expected
    *   The expected formatted value.
-   * @param $string
+   * @param string $string
    *   A string to be formatted.
    * @param array $args
    *   (optional) An associative array of replacements to make. Defaults to
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php
index c89943346579c1e9e6733b863451164dc02b5524..0d8727710d3646cf15c10e1845acb3053ead4a9b 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php
@@ -100,7 +100,7 @@ public function testProcess(): void {
    * This is necessary because the container clone does not clone the parameter
    * bag so the setParameter() call effects the parent container as well.
    *
-   * @param $service
+   * @param \Symfony\Component\DependencyInjection\Definition $service
    *   The service definition.
    *
    * @return \Symfony\Component\DependencyInjection\ContainerBuilder
@@ -120,7 +120,7 @@ protected function getSqliteContainer($service) {
    * This is necessary because the container clone does not clone the parameter
    * bag so the setParameter() call effects the parent container as well.
    *
-   * @param $service
+   * @param \Symfony\Component\DependencyInjection\Definition $service
    *   The service definition.
    *
    * @return \Symfony\Component\DependencyInjection\ContainerBuilder
@@ -138,7 +138,7 @@ protected function getMysqlContainer($service) {
    * This is necessary because the container clone does not clone the parameter
    * bag so the setParameter() call effects the parent container as well.
    *
-   * @param $service
+   * @param \Symfony\Component\DependencyInjection\Definition $service
    *   The service definition.
    *
    * @return \Symfony\Component\DependencyInjection\ContainerBuilder
diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php
index 62175ac657ce6ac0d2f99ecb572e5e937976bb5b..fd2ddc5acf4d46e3b1823477ae325811ad2218ae 100644
--- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php
+++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php
@@ -117,9 +117,9 @@ protected function getLocalTaskManager($module_dirs, $route_name, $route_params)
   /**
    * Tests integration for local tasks.
    *
-   * @param $route_name
+   * @param string $route_name
    *   Route name to base task building on.
-   * @param $expected_tasks
+   * @param array $expected_tasks
    *   A list of tasks groups by level expected at the given route
    * @param array $route_params
    *   (optional) A list of route parameters used to resolve tasks.
diff --git a/core/tests/Drupal/Tests/TestFileCreationTrait.php b/core/tests/Drupal/Tests/TestFileCreationTrait.php
index ef8437c2f89735757c67be7c52ae08fb2cc267fb..43357296dedeadaaf5879032d7698ed1988843d5 100644
--- a/core/tests/Drupal/Tests/TestFileCreationTrait.php
+++ b/core/tests/Drupal/Tests/TestFileCreationTrait.php
@@ -43,10 +43,10 @@ trait TestFileCreationTrait {
    * is prefixed with one of the above types, it will get returned as well, even
    * on subsequent calls.
    *
-   * @param $type
+   * @param string $type
    *   File type, possible values: 'binary', 'html', 'image', 'javascript',
    *   'php', 'sql', 'text'.
-   * @param $size
+   * @param int|null $size
    *   (optional) File size in bytes to match. Defaults to NULL, which will not
    *   filter the returned list by size.
    *