Issue #3324801 by Spokje, mondrake: Fix PHPStan L2 error "Property Foo::$bar has unknown class Baz as its type."
(cherry picked from commit 85eeb1bde1
)
merge-requests/2477/merge
parent
0a0903748a
commit
18e211cc79
|
@ -84,7 +84,7 @@ class Config {
|
||||||
/**
|
/**
|
||||||
* The root package.
|
* The root package.
|
||||||
*
|
*
|
||||||
* @var Composer\Package\RootPackageInterface
|
* @var \Composer\Package\RootPackageInterface
|
||||||
*/
|
*/
|
||||||
protected $rootPackage;
|
protected $rootPackage;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ class StaticDiscoveryDecorator extends StaticDiscovery {
|
||||||
/**
|
/**
|
||||||
* A callback or closure used for registering additional definitions.
|
* A callback or closure used for registering additional definitions.
|
||||||
*
|
*
|
||||||
* @var \Callable
|
* @var callable
|
||||||
*/
|
*/
|
||||||
protected $registerDefinitions;
|
protected $registerDefinitions;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface {
|
||||||
*
|
*
|
||||||
* If this is NULL a rebuild will be triggered.
|
* 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::addGuesser()
|
||||||
* @see \Drupal\Core\File\MimeType\MimeTypeGuesser::sortGuessers()
|
* @see \Drupal\Core\File\MimeType\MimeTypeGuesser::sortGuessers()
|
||||||
|
|
|
@ -10,7 +10,7 @@ class LazyRouteCollection extends RouteCollection {
|
||||||
/**
|
/**
|
||||||
* The route provider for this generator.
|
* The route provider for this generator.
|
||||||
*
|
*
|
||||||
* @var \Symfony\Component\Routing\RouteProviderInterface
|
* @var \Drupal\Core\Routing\RouteProviderInterface
|
||||||
*/
|
*/
|
||||||
protected $provider;
|
protected $provider;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ trait FunctionalTestSetupTrait {
|
||||||
/**
|
/**
|
||||||
* The class loader to use for installation and initialization of setup.
|
* The class loader to use for installation and initialization of setup.
|
||||||
*
|
*
|
||||||
* @var \Symfony\Component\Classloader\Classloader
|
* @var \Composer\Autoload\ClassLoader
|
||||||
*/
|
*/
|
||||||
protected $classLoader;
|
protected $classLoader;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Language extends TypedData {
|
||||||
protected $id;
|
protected $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Drupal\Core\Language
|
* @var \Drupal\Core\Language\Language
|
||||||
*/
|
*/
|
||||||
protected $language;
|
protected $language;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class BlockViewBuilderTest extends KernelTestBase {
|
||||||
/**
|
/**
|
||||||
* The block being tested.
|
* The block being tested.
|
||||||
*
|
*
|
||||||
* @var \Drupal\block\Entity\BlockInterface
|
* @var \Drupal\block\BlockInterface
|
||||||
*/
|
*/
|
||||||
protected $block;
|
protected $block;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ abstract class BlockContentTypeResourceTestBase extends ConfigEntityResourceTest
|
||||||
protected static $entityTypeId = 'block_content_type';
|
protected static $entityTypeId = 'block_content_type';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Drupal\block_content\Entity\BlockContentTypeInterface
|
* @var \Drupal\block_content\BlockContentTypeInterface
|
||||||
*/
|
*/
|
||||||
protected $entity;
|
protected $entity;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ class CommentController extends ControllerBase {
|
||||||
/**
|
/**
|
||||||
* The entity repository.
|
* The entity repository.
|
||||||
*
|
*
|
||||||
* @var Drupal\Core\Entity\EntityRepositoryInterface
|
* @var \Drupal\Core\Entity\EntityRepositoryInterface
|
||||||
*/
|
*/
|
||||||
protected $entityRepository;
|
protected $entityRepository;
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ class DefaultViewRecentCommentsTest extends ViewTestBase {
|
||||||
/**
|
/**
|
||||||
* Contains the node object used for comments of this test.
|
* Contains the node object used for comments of this test.
|
||||||
*
|
*
|
||||||
* @var \Drupal\node\Node
|
* @var \Drupal\node\NodeInterface
|
||||||
*/
|
*/
|
||||||
public $node;
|
public $node;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class CommentStatisticsUnitTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* Mock statement.
|
* Mock statement.
|
||||||
*
|
*
|
||||||
* @var \Drupal\Core\Database\Statement
|
* @var \Drupal\Core\Database\StatementInterface
|
||||||
*/
|
*/
|
||||||
protected $statement;
|
protected $statement;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class SqlContentEntityStorageSchemaColumnTest extends KernelTestBase {
|
||||||
/**
|
/**
|
||||||
* The created entity.
|
* The created entity.
|
||||||
*
|
*
|
||||||
* @var \Drupal\Core\Entity\Entity
|
* @var \Drupal\Core\Entity\EntityInterface
|
||||||
*/
|
*/
|
||||||
protected $entity;
|
protected $entity;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class NodeRevisionsAllTest extends NodeTestBase {
|
||||||
/**
|
/**
|
||||||
* A list of nodes created to be used as starting point of different tests.
|
* A list of nodes created to be used as starting point of different tests.
|
||||||
*
|
*
|
||||||
* @var Drupal\node\NodeInterface[]
|
* @var \Drupal\node\NodeInterface[]
|
||||||
*/
|
*/
|
||||||
protected $nodes;
|
protected $nodes;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class PathPluginTest extends NodeTestBase {
|
||||||
/**
|
/**
|
||||||
* Contains all nodes used by this test.
|
* Contains all nodes used by this test.
|
||||||
*
|
*
|
||||||
* @var Node[]
|
* @var \Drupal\node\Entity\Node[]
|
||||||
*/
|
*/
|
||||||
protected $nodes;
|
protected $nodes;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ abstract class OptionsDynamicValuesTestBase extends FieldTestBase {
|
||||||
/**
|
/**
|
||||||
* The created entity.
|
* The created entity.
|
||||||
*
|
*
|
||||||
* @var \Drupal\Core\Entity\Entity
|
* @var \Drupal\Core\Entity\EntityInterface
|
||||||
*/
|
*/
|
||||||
protected $entity;
|
protected $entity;
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ class SearchQuery extends SelectExtender {
|
||||||
* This is always used for the second step in the query, but is not part of
|
* This is always used for the second step in the query, but is not part of
|
||||||
* the preparation step unless $this->simple is FALSE.
|
* the preparation step unless $this->simple is FALSE.
|
||||||
*
|
*
|
||||||
* @var Drupal\Core\Database\Query\ConditionInterface[]
|
* @var \Drupal\Core\Database\Query\ConditionInterface[]
|
||||||
*/
|
*/
|
||||||
protected $conditions;
|
protected $conditions;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class EntityFilteringThemeTest extends BrowserTestBase {
|
||||||
/**
|
/**
|
||||||
* A test user.
|
* A test user.
|
||||||
*
|
*
|
||||||
* @var \Drupal\user\User
|
* @var \Drupal\user\Entity\User
|
||||||
*/
|
*/
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class EntityFilteringThemeTest extends BrowserTestBase {
|
||||||
/**
|
/**
|
||||||
* A test node.
|
* A test node.
|
||||||
*
|
*
|
||||||
* @var \Drupal\node\Node
|
* @var \Drupal\node\Entity\Node
|
||||||
*/
|
*/
|
||||||
protected $node;
|
protected $node;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class EntityFilteringThemeTest extends BrowserTestBase {
|
||||||
/**
|
/**
|
||||||
* A test taxonomy term.
|
* A test taxonomy term.
|
||||||
*
|
*
|
||||||
* @var \Drupal\taxonomy\Term
|
* @var \Drupal\taxonomy\Entity\Term
|
||||||
*/
|
*/
|
||||||
protected $term;
|
protected $term;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class EntityFilteringThemeTest extends BrowserTestBase {
|
||||||
/**
|
/**
|
||||||
* A test comment.
|
* A test comment.
|
||||||
*
|
*
|
||||||
* @var \Drupal\comment\Comment
|
* @var \Drupal\comment\Entity\Comment
|
||||||
*/
|
*/
|
||||||
protected $comment;
|
protected $comment;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class UserPasswordResetTest extends BrowserTestBase {
|
||||||
/**
|
/**
|
||||||
* Language manager object.
|
* Language manager object.
|
||||||
*
|
*
|
||||||
* @var \Drupal\language\LanguageManagerInterface
|
* @var \Drupal\Core\Language\LanguageManagerInterface
|
||||||
*/
|
*/
|
||||||
protected $languageManager;
|
protected $languageManager;
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ class UserRoleConditionTest extends KernelTestBase {
|
||||||
/**
|
/**
|
||||||
* A custom role for testing purposes.
|
* A custom role for testing purposes.
|
||||||
*
|
*
|
||||||
* @var \Drupal\user\Entity\RoleInterface
|
* @var \Drupal\user\RoleInterface
|
||||||
*/
|
*/
|
||||||
protected $role;
|
protected $role;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class WhosOnlineBlockTest extends KernelTestBase {
|
||||||
/**
|
/**
|
||||||
* The block being tested.
|
* The block being tested.
|
||||||
*
|
*
|
||||||
* @var \Drupal\block\Entity\BlockInterface
|
* @var \Drupal\block\BlockInterface
|
||||||
*/
|
*/
|
||||||
protected $block;
|
protected $block;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ use Drupal\Core\Form\FormStateInterface;
|
||||||
class Combine extends StringFilter {
|
class Combine extends StringFilter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var views_plugin_query_default
|
* @var \Drupal\views\Plugin\views\query\QueryPluginBase
|
||||||
*/
|
*/
|
||||||
public $query;
|
public $query;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ abstract class QueryPluginBase extends PluginBase implements CacheableDependency
|
||||||
/**
|
/**
|
||||||
* A pager plugin that should be provided by the display.
|
* 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;
|
public $pager = NULL;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ class RouteSubscriberTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* The mocked view storage.
|
* The mocked view storage.
|
||||||
*
|
*
|
||||||
* @var \Drupal\views\ViewStorage|\PHPUnit\Framework\MockObject\MockObject
|
* @var \Drupal\Tests\views\Kernel\ViewStorageTest|\PHPUnit\Framework\MockObject\MockObject
|
||||||
*/
|
*/
|
||||||
protected $viewStorage;
|
protected $viewStorage;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ class ReportTest extends UITestBase {
|
||||||
/**
|
/**
|
||||||
* Stores an admin user used by the different tests.
|
* Stores an admin user used by the different tests.
|
||||||
*
|
*
|
||||||
* @var \Drupal\user\User
|
* @var \Drupal\user\Entity\User
|
||||||
*/
|
*/
|
||||||
protected $adminUser;
|
protected $adminUser;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class SettingsTest extends UITestBase {
|
||||||
/**
|
/**
|
||||||
* Stores an admin user used by the different tests.
|
* Stores an admin user used by the different tests.
|
||||||
*
|
*
|
||||||
* @var \Drupal\user\User
|
* @var \Drupal\user\Entity\User
|
||||||
*/
|
*/
|
||||||
protected $adminUser;
|
protected $adminUser;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TestSiteUserLoginCommand extends Command {
|
||||||
/**
|
/**
|
||||||
* The class loader to use for installation and initialization of setup.
|
* The class loader to use for installation and initialization of setup.
|
||||||
*
|
*
|
||||||
* @var \Symfony\Component\Classloader\Classloader
|
* @var \Composer\Autoload\ClassLoader
|
||||||
*/
|
*/
|
||||||
protected $classLoader;
|
protected $classLoader;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CsrfAccessCheckTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* The mock route match.
|
* The mock route match.
|
||||||
*
|
*
|
||||||
* @var \Drupal\Core\RouteMatch\RouteMatchInterface|\PHPUnit\Framework\MockObject\MockObject
|
* @var \Drupal\Core\Routing\RouteMatchInterface|\PHPUnit\Framework\MockObject\MockObject
|
||||||
*/
|
*/
|
||||||
protected $routeMatch;
|
protected $routeMatch;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class CssOptimizerUnitTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* The file URL generator mock.
|
* 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;
|
protected $fileUrlGenerator;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class BarClass {
|
||||||
/**
|
/**
|
||||||
* Storage for a protected BazClass object.
|
* Storage for a protected BazClass object.
|
||||||
*
|
*
|
||||||
* @var Drupal\Tests\Core\DependencyInjection\Fixture\BazClass
|
* @var \Drupal\Tests\Core\DependencyInjection\Fixture\BazClass
|
||||||
*/
|
*/
|
||||||
protected $baz;
|
protected $baz;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ use Symfony\Component\Routing\Route;
|
||||||
class EntityRevisionRouteEnhancerTest extends UnitTestCase {
|
class EntityRevisionRouteEnhancerTest extends UnitTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Drupal\Core\Routing\RouteEnhancer\EntityRevisionRouteEnhancer
|
* @var \Drupal\Core\Routing\Enhancer\EntityRevisionRouteEnhancer
|
||||||
*/
|
*/
|
||||||
protected $routeEnhancer;
|
protected $routeEnhancer;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class EntityUnitTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* The entity under test.
|
* The entity under test.
|
||||||
*
|
*
|
||||||
* @var \Drupal\Core\Entity\Entity|\PHPUnit\Framework\MockObject\MockObject
|
* @var \Drupal\Core\Entity\EntityInterface|\PHPUnit\Framework\MockObject\MockObject
|
||||||
*/
|
*/
|
||||||
protected $entity;
|
protected $entity;
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ class CustomPageExceptionHtmlSubscriberTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* The tested custom page exception subscriber.
|
* 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;
|
protected $customPageSubscriber;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ class ModuleRouteSubscriberTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* The mock module handler.
|
* The mock module handler.
|
||||||
*
|
*
|
||||||
* @var Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit\Framework\MockObject\MockObject
|
* @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit\Framework\MockObject\MockObject
|
||||||
*/
|
*/
|
||||||
protected $moduleHandler;
|
protected $moduleHandler;
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ class TwigExtensionTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* The file URL generator mock.
|
* 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;
|
protected $fileUrlGenerator;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class RegistryTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* The mocked theme registry.
|
* The mocked theme registry.
|
||||||
*
|
*
|
||||||
* @var \Drupal\Core\Theme\Registry|PHPUnit\Framework\MockObject\MockObject
|
* @var \Drupal\Core\Theme\Registry|\PHPUnit\Framework\MockObject\MockObject
|
||||||
*/
|
*/
|
||||||
protected $registry;
|
protected $registry;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue