cs: Enable more risky rules.

This commit is contained in:
Pol Dellaiera
2021-11-30 11:28:52 +01:00
parent 3631fd99fd
commit c8195e6df5
65 changed files with 155 additions and 139 deletions

View File

@@ -135,7 +135,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
$managerDefinition = $container->getDefinition(self::WIDGET_MANAGER);
// collect the widget factories
/* @var $extensionClass HasWidgetFactoriesExtensionInterface */
/** @var HasWidgetFactoriesExtensionInterface $extensionClass */
$extensionClass = $container->getExtension($extension);
// throw an error if extension does not implement HasWidgetFactoriesExtensionInterface
if (!$extensionClass instanceof HasWidgetFactoriesExtensionInterface) {
@@ -182,7 +182,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
// register the widget with config to the service, using the method
// `addWidget`
if ($this->widgetServices[$alias] instanceof WidgetFactoryInterface) {
/* @var $factory WidgetFactoryInterface */
/** @var WidgetFactoryInterface $factory */
$factory = $this->widgetServices[$alias];
// get the config (under the key which equals to widget_alias
$config = isset($param[$factory->getWidgetAlias()]) ?
@@ -263,7 +263,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
// add the services defined by factories
foreach ($this->widgetFactories as $factory) {
/* @var $factory WidgetFactoryInterface */
/** @var WidgetFactoryInterface $factory */
$alias = $factory->getWidgetAlias();
// check the alias is not empty