From 85eeb1bde10c2685a746c076e586060249f5fb65 Mon Sep 17 00:00:00 2001
From: Dave Long <dave@longwaveconsulting.com>
Date: Wed, 7 Dec 2022 11:22:31 +0000
Subject: [PATCH] Issue #3324801 by Spokje, mondrake: Fix PHPStan L2 error
 "Property Foo::$bar has unknown class Baz as its type."

---
 composer/Plugin/VendorHardening/Config.php                | 2 +-
 .../Plugin/Discovery/StaticDiscoveryDecorator.php         | 2 +-
 core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php    | 2 +-
 core/lib/Drupal/Core/Routing/LazyRouteCollection.php      | 2 +-
 core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php    | 2 +-
 .../Drupal/Core/TypedData/Plugin/DataType/Language.php    | 2 +-
 .../block/tests/src/Kernel/BlockViewBuilderTest.php       | 2 +-
 .../Functional/Rest/BlockContentTypeResourceTestBase.php  | 2 +-
 core/modules/comment/src/Controller/CommentController.php | 2 +-
 .../Functional/Views/DefaultViewRecentCommentsTest.php    | 2 +-
 .../comment/tests/src/Unit/CommentStatisticsUnitTest.php  | 2 +-
 .../Update/SqlContentEntityStorageSchemaColumnTest.php    | 2 +-
 .../node/tests/src/Functional/NodeRevisionsAllTest.php    | 2 +-
 .../node/tests/src/Functional/Views/PathPluginTest.php    | 2 +-
 .../tests/src/Functional/OptionsDynamicValuesTestBase.php | 2 +-
 core/modules/search/src/SearchQuery.php                   | 2 +-
 .../src/Functional/Theme/EntityFilteringThemeTest.php     | 8 ++++----
 .../user/tests/src/Functional/UserPasswordResetTest.php   | 2 +-
 .../tests/src/Kernel/Condition/UserRoleConditionTest.php  | 2 +-
 .../modules/user/tests/src/Kernel/WhosOnlineBlockTest.php | 2 +-
 core/modules/views/src/Plugin/views/filter/Combine.php    | 2 +-
 .../views/src/Plugin/views/query/QueryPluginBase.php      | 2 +-
 .../src/Unit/EventSubscriber/RouteSubscriberTest.php      | 2 +-
 core/modules/views_ui/tests/src/Functional/ReportTest.php | 2 +-
 .../views_ui/tests/src/Functional/SettingsTest.php        | 2 +-
 .../Drupal/TestSite/Commands/TestSiteUserLoginCommand.php | 2 +-
 .../Drupal/Tests/Core/Access/CsrfAccessCheckTest.php      | 2 +-
 .../Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php      | 2 +-
 .../Tests/Core/DependencyInjection/Fixture/BarClass.php   | 2 +-
 .../Core/Enhancer/EntityRevisionRouteEnhancerTest.php     | 2 +-
 core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php    | 2 +-
 .../CustomPageExceptionHtmlSubscriberTest.php             | 2 +-
 .../Core/EventSubscriber/ModuleRouteSubscriberTest.php    | 2 +-
 .../Drupal/Tests/Core/Template/TwigExtensionTest.php      | 2 +-
 core/tests/Drupal/Tests/Core/Theme/RegistryTest.php       | 2 +-
 35 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/composer/Plugin/VendorHardening/Config.php b/composer/Plugin/VendorHardening/Config.php
index 62371eb6cda0..ab15475ec674 100644
--- a/composer/Plugin/VendorHardening/Config.php
+++ b/composer/Plugin/VendorHardening/Config.php
@@ -85,7 +85,7 @@ class Config {
   /**
    * The root package.
    *
-   * @var Composer\Package\RootPackageInterface
+   * @var \Composer\Package\RootPackageInterface
    */
   protected $rootPackage;
 
diff --git a/core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php b/core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php
index d14c8796def7..d9277db770da 100644
--- a/core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php
+++ b/core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php
@@ -17,7 +17,7 @@ class StaticDiscoveryDecorator extends StaticDiscovery {
   /**
    * A callback or closure used for registering additional definitions.
    *
-   * @var \Callable
+   * @var callable
    */
   protected $registerDefinitions;
 
diff --git a/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php b/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php
index 172f13ff62c5..538831490d62 100644
--- a/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php
+++ b/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php
@@ -22,7 +22,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface {
    *
    * If this is NULL a rebuild will be triggered.
    *
-   * @var \Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface[]
+   * @var \Symfony\Component\Mime\MimeTypeGuesserInterface[]
    *
    * @see \Drupal\Core\File\MimeType\MimeTypeGuesser::addGuesser()
    * @see \Drupal\Core\File\MimeType\MimeTypeGuesser::sortGuessers()
diff --git a/core/lib/Drupal/Core/Routing/LazyRouteCollection.php b/core/lib/Drupal/Core/Routing/LazyRouteCollection.php
index c78cd7010c54..f19f4f4d65f6 100644
--- a/core/lib/Drupal/Core/Routing/LazyRouteCollection.php
+++ b/core/lib/Drupal/Core/Routing/LazyRouteCollection.php
@@ -10,7 +10,7 @@ class LazyRouteCollection extends RouteCollection {
   /**
    * The route provider for this generator.
    *
-   * @var \Symfony\Component\Routing\RouteProviderInterface
+   * @var \Drupal\Core\Routing\RouteProviderInterface
    */
   protected $provider;
 
diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
index 57e68e2ad3f3..5d37d5c8adbb 100644
--- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
+++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
@@ -42,7 +42,7 @@ trait FunctionalTestSetupTrait {
   /**
    * The class loader to use for installation and initialization of setup.
    *
-   * @var \Symfony\Component\Classloader\Classloader
+   * @var \Composer\Autoload\ClassLoader
    */
   protected $classLoader;
 
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php
index 9f74c4f4592b..98a429fbbfcb 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php
@@ -27,7 +27,7 @@ class Language extends TypedData {
   protected $id;
 
   /**
-   * @var \Drupal\Core\Language
+   * @var \Drupal\Core\Language\Language
    */
   protected $language;
 
diff --git a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
index 03b728da7f98..d14e9021a18b 100644
--- a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
@@ -25,7 +25,7 @@ class BlockViewBuilderTest extends KernelTestBase {
   /**
    * The block being tested.
    *
-   * @var \Drupal\block\Entity\BlockInterface
+   * @var \Drupal\block\BlockInterface
    */
   protected $block;
 
diff --git a/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php b/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php
index f41577634d25..8c28e3584f2d 100644
--- a/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php
+++ b/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php
@@ -18,7 +18,7 @@ abstract class BlockContentTypeResourceTestBase extends ConfigEntityResourceTest
   protected static $entityTypeId = 'block_content_type';
 
   /**
-   * @var \Drupal\block_content\Entity\BlockContentTypeInterface
+   * @var \Drupal\block_content\BlockContentTypeInterface
    */
   protected $entity;
 
diff --git a/core/modules/comment/src/Controller/CommentController.php b/core/modules/comment/src/Controller/CommentController.php
index 9304e20009e1..8c3a9c74b09c 100644
--- a/core/modules/comment/src/Controller/CommentController.php
+++ b/core/modules/comment/src/Controller/CommentController.php
@@ -52,7 +52,7 @@ class CommentController extends ControllerBase {
   /**
    * The entity repository.
    *
-   * @var Drupal\Core\Entity\EntityRepositoryInterface
+   * @var \Drupal\Core\Entity\EntityRepositoryInterface
    */
   protected $entityRepository;
 
diff --git a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
index 8065871932e0..5e584b15fd43 100644
--- a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
@@ -61,7 +61,7 @@ class DefaultViewRecentCommentsTest extends ViewTestBase {
   /**
    * Contains the node object used for comments of this test.
    *
-   * @var \Drupal\node\Node
+   * @var \Drupal\node\NodeInterface
    */
   public $node;
 
diff --git a/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php b/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php
index 76e44401dcbf..a0dd40abc222 100644
--- a/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php
+++ b/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php
@@ -15,7 +15,7 @@ class CommentStatisticsUnitTest extends UnitTestCase {
   /**
    * Mock statement.
    *
-   * @var \Drupal\Core\Database\Statement
+   * @var \Drupal\Core\Database\StatementInterface
    */
   protected $statement;
 
diff --git a/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php b/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
index 7bcd0fa55e59..1f3233f28de5 100644
--- a/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
+++ b/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
@@ -28,7 +28,7 @@ class SqlContentEntityStorageSchemaColumnTest extends KernelTestBase {
   /**
    * The created entity.
    *
-   * @var \Drupal\Core\Entity\Entity
+   * @var \Drupal\Core\Entity\EntityInterface
    */
   protected $entity;
 
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
index 67da2be2838c..a9687f63e7b0 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
@@ -21,7 +21,7 @@ class NodeRevisionsAllTest extends NodeTestBase {
   /**
    * A list of nodes created to be used as starting point of different tests.
    *
-   * @var Drupal\node\NodeInterface[]
+   * @var \Drupal\node\NodeInterface[]
    */
   protected $nodes;
 
diff --git a/core/modules/node/tests/src/Functional/Views/PathPluginTest.php b/core/modules/node/tests/src/Functional/Views/PathPluginTest.php
index 8645a6cdd317..9eee667a63a8 100644
--- a/core/modules/node/tests/src/Functional/Views/PathPluginTest.php
+++ b/core/modules/node/tests/src/Functional/Views/PathPluginTest.php
@@ -33,7 +33,7 @@ class PathPluginTest extends NodeTestBase {
   /**
    * Contains all nodes used by this test.
    *
-   * @var Node[]
+   * @var \Drupal\node\Entity\Node[]
    */
   protected $nodes;
 
diff --git a/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php b/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
index cc541675b53f..08d9bfbd6f5a 100644
--- a/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
+++ b/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
@@ -22,7 +22,7 @@ abstract class OptionsDynamicValuesTestBase extends FieldTestBase {
   /**
    * The created entity.
    *
-   * @var \Drupal\Core\Entity\Entity
+   * @var \Drupal\Core\Entity\EntityInterface
    */
   protected $entity;
 
diff --git a/core/modules/search/src/SearchQuery.php b/core/modules/search/src/SearchQuery.php
index 6869da434f71..ec858789238c 100644
--- a/core/modules/search/src/SearchQuery.php
+++ b/core/modules/search/src/SearchQuery.php
@@ -110,7 +110,7 @@ class SearchQuery extends SelectExtender {
    * This is always used for the second step in the query, but is not part of
    * the preparation step unless $this->simple is FALSE.
    *
-   * @var Drupal\Core\Database\Query\ConditionInterface[]
+   * @var \Drupal\Core\Database\Query\ConditionInterface[]
    */
   protected $conditions;
 
diff --git a/core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php b/core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php
index c0f91f8b4384..112d95584115 100644
--- a/core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php
@@ -47,7 +47,7 @@ class EntityFilteringThemeTest extends BrowserTestBase {
   /**
    * A test user.
    *
-   * @var \Drupal\user\User
+   * @var \Drupal\user\Entity\User
    */
   protected $user;
 
@@ -55,7 +55,7 @@ class EntityFilteringThemeTest extends BrowserTestBase {
   /**
    * A test node.
    *
-   * @var \Drupal\node\Node
+   * @var \Drupal\node\Entity\Node
    */
   protected $node;
 
@@ -63,7 +63,7 @@ class EntityFilteringThemeTest extends BrowserTestBase {
   /**
    * A test taxonomy term.
    *
-   * @var \Drupal\taxonomy\Term
+   * @var \Drupal\taxonomy\Entity\Term
    */
   protected $term;
 
@@ -71,7 +71,7 @@ class EntityFilteringThemeTest extends BrowserTestBase {
   /**
    * A test comment.
    *
-   * @var \Drupal\comment\Comment
+   * @var \Drupal\comment\Entity\Comment
    */
   protected $comment;
 
diff --git a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
index e984c466edd0..6229dbb97cd9 100644
--- a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
+++ b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
@@ -31,7 +31,7 @@ class UserPasswordResetTest extends BrowserTestBase {
   /**
    * Language manager object.
    *
-   * @var \Drupal\language\LanguageManagerInterface
+   * @var \Drupal\Core\Language\LanguageManagerInterface
    */
   protected $languageManager;
 
diff --git a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
index df75a08a3d4b..31298d2dc202 100644
--- a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
+++ b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
@@ -39,7 +39,7 @@ class UserRoleConditionTest extends KernelTestBase {
   /**
    * A custom role for testing purposes.
    *
-   * @var \Drupal\user\Entity\RoleInterface
+   * @var \Drupal\user\RoleInterface
    */
   protected $role;
 
diff --git a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
index 90551a75c155..d7d7856a3784 100644
--- a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
+++ b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
@@ -21,7 +21,7 @@ class WhosOnlineBlockTest extends KernelTestBase {
   /**
    * The block being tested.
    *
-   * @var \Drupal\block\Entity\BlockInterface
+   * @var \Drupal\block\BlockInterface
    */
   protected $block;
 
diff --git a/core/modules/views/src/Plugin/views/filter/Combine.php b/core/modules/views/src/Plugin/views/filter/Combine.php
index 36dab819e57f..b541009c3dea 100644
--- a/core/modules/views/src/Plugin/views/filter/Combine.php
+++ b/core/modules/views/src/Plugin/views/filter/Combine.php
@@ -14,7 +14,7 @@
 class Combine extends StringFilter {
 
   /**
-   * @var views_plugin_query_default
+   * @var \Drupal\views\Plugin\views\query\QueryPluginBase
    */
   public $query;
 
diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
index 582023b3ea8f..6c49b1d011c8 100644
--- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
+++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
@@ -36,7 +36,7 @@ abstract class QueryPluginBase extends PluginBase implements CacheableDependency
   /**
    * A pager plugin that should be provided by the display.
    *
-   * @var views_plugin_pager
+   * @var \Drupal\views\Plugin\views\pager\PagerPluginBase|null
    */
   public $pager = NULL;
 
diff --git a/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php b/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
index 16167cf27d2f..d2fa07832e60 100644
--- a/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
+++ b/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
@@ -30,7 +30,7 @@ class RouteSubscriberTest extends UnitTestCase {
   /**
    * The mocked view storage.
    *
-   * @var \Drupal\views\ViewStorage|\PHPUnit\Framework\MockObject\MockObject
+   * @var \Drupal\Tests\views\Kernel\ViewStorageTest|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $viewStorage;
 
diff --git a/core/modules/views_ui/tests/src/Functional/ReportTest.php b/core/modules/views_ui/tests/src/Functional/ReportTest.php
index bc91ec584598..b362b1a7e2f4 100644
--- a/core/modules/views_ui/tests/src/Functional/ReportTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ReportTest.php
@@ -24,7 +24,7 @@ class ReportTest extends UITestBase {
   /**
    * Stores an admin user used by the different tests.
    *
-   * @var \Drupal\user\User
+   * @var \Drupal\user\Entity\User
    */
   protected $adminUser;
 
diff --git a/core/modules/views_ui/tests/src/Functional/SettingsTest.php b/core/modules/views_ui/tests/src/Functional/SettingsTest.php
index 8256af296b5c..f926e63b95ef 100644
--- a/core/modules/views_ui/tests/src/Functional/SettingsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/SettingsTest.php
@@ -14,7 +14,7 @@ class SettingsTest extends UITestBase {
   /**
    * Stores an admin user used by the different tests.
    *
-   * @var \Drupal\user\User
+   * @var \Drupal\user\Entity\User
    */
   protected $adminUser;
 
diff --git a/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php b/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php
index 6ea3395ea538..82cfb91f8a23 100644
--- a/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php
+++ b/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php
@@ -22,7 +22,7 @@ class TestSiteUserLoginCommand extends Command {
   /**
    * The class loader to use for installation and initialization of setup.
    *
-   * @var \Symfony\Component\Classloader\Classloader
+   * @var \Composer\Autoload\ClassLoader
    */
   protected $classLoader;
 
diff --git a/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php
index 73628aa50bb1..ff804a242127 100644
--- a/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php
@@ -31,7 +31,7 @@ class CsrfAccessCheckTest extends UnitTestCase {
   /**
    * The mock route match.
    *
-   * @var \Drupal\Core\RouteMatch\RouteMatchInterface|\PHPUnit\Framework\MockObject\MockObject
+   * @var \Drupal\Core\Routing\RouteMatchInterface|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $routeMatch;
 
diff --git a/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
index 579f7da70baa..2c4992841629 100644
--- a/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
@@ -28,7 +28,7 @@ class CssOptimizerUnitTest extends UnitTestCase {
   /**
    * The file URL generator mock.
    *
-   * @var \Drupal\Core\File\FileUrlGeneratorInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\File\FileUrlGeneratorInterface|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $fileUrlGenerator;
 
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php
index 35c236b2d11e..4fc0a6487f4a 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php
@@ -13,7 +13,7 @@ class BarClass {
   /**
    * Storage for a protected BazClass object.
    *
-   * @var Drupal\Tests\Core\DependencyInjection\Fixture\BazClass
+   * @var \Drupal\Tests\Core\DependencyInjection\Fixture\BazClass
    */
   protected $baz;
 
diff --git a/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php b/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php
index a250594ee231..029f9f12ca90 100644
--- a/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php
+++ b/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php
@@ -16,7 +16,7 @@
 class EntityRevisionRouteEnhancerTest extends UnitTestCase {
 
   /**
-   * @var \Drupal\Core\Routing\RouteEnhancer\EntityRevisionRouteEnhancer
+   * @var \Drupal\Core\Routing\Enhancer\EntityRevisionRouteEnhancer
    */
   protected $routeEnhancer;
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
index 90896144b216..825a10b4600e 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@@ -23,7 +23,7 @@ class EntityUnitTest extends UnitTestCase {
   /**
    * The entity under test.
    *
-   * @var \Drupal\Core\Entity\Entity|\PHPUnit\Framework\MockObject\MockObject
+   * @var \Drupal\Core\Entity\EntityInterface|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $entity;
 
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
index 964220206cc4..26df85f66c9d 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
@@ -54,7 +54,7 @@ class CustomPageExceptionHtmlSubscriberTest extends UnitTestCase {
   /**
    * The tested custom page exception subscriber.
    *
-   * @var \Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber|\Drupal\Tests\Core\EventSubscriber\TestCustomPageExceptionHtmlSubscriber
+   * @var \Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber|\Drupal\Tests\Core\EventSubscriber\CustomPageExceptionHtmlSubscriberTest
    */
   protected $customPageSubscriber;
 
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php
index ce791139044a..56a22f62b87b 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php
@@ -17,7 +17,7 @@ class ModuleRouteSubscriberTest extends UnitTestCase {
   /**
    * The mock module handler.
    *
-   * @var Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit\Framework\MockObject\MockObject
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $moduleHandler;
 
diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
index d1b93b6f4d8d..6a043397d2ad 100644
--- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
@@ -66,7 +66,7 @@ class TwigExtensionTest extends UnitTestCase {
   /**
    * The file URL generator mock.
    *
-   * @var \Drupal\Core\File\FileUrlGeneratorInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\File\FileUrlGeneratorInterface|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $fileUrlGenerator;
 
diff --git a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
index 7f2f2dc08273..a394a12f9ac2 100644
--- a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
@@ -16,7 +16,7 @@ class RegistryTest extends UnitTestCase {
   /**
    * The mocked theme registry.
    *
-   * @var \Drupal\Core\Theme\Registry|PHPUnit\Framework\MockObject\MockObject
+   * @var \Drupal\Core\Theme\Registry|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $registry;
 
-- 
GitLab