mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
DX: apply rector rulesset up to PHP72
This commit is contained in:
@@ -193,8 +193,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
||||
/** @var WidgetFactoryInterface $factory */
|
||||
$factory = $this->widgetServices[$alias];
|
||||
// get the config (under the key which equals to widget_alias
|
||||
$config = isset($param[$factory->getWidgetAlias()]) ?
|
||||
$param[$factory->getWidgetAlias()] : [];
|
||||
$config = $param[$factory->getWidgetAlias()] ?? [];
|
||||
// register the service into the container
|
||||
$serviceId = $this->registerServiceIntoContainer(
|
||||
$container,
|
||||
|
@@ -139,7 +139,7 @@ trait AddWidgetConfigurationTrait
|
||||
protected function addWidgetsConfiguration(string $place, ContainerBuilder $containerBuilder)
|
||||
{
|
||||
$treeBuilder = new TreeBuilder($place);
|
||||
$root = $treeBuilder->getRootNode($place)
|
||||
$root = $treeBuilder->getRootNode()
|
||||
->canBeUnset()
|
||||
->info('register widgets on place "' . $place . '"');
|
||||
|
||||
@@ -170,7 +170,7 @@ trait AddWidgetConfigurationTrait
|
||||
// adding the possible config on each widget under the widget_alias
|
||||
foreach ($this->filterWidgetByPlace($place) as $factory) {
|
||||
$builder = new TreeBuilder($factory->getWidgetAlias());
|
||||
$widgetOptionsRoot = $builder->getRootNode($factory->getWidgetAlias());
|
||||
$widgetOptionsRoot = $builder->getRootNode();
|
||||
$widgetOptionsRoot->canBeUnset()
|
||||
->info(sprintf(
|
||||
'the configuration for the widget "%s" (only required if this widget is set in widget_alias)',
|
||||
|
Reference in New Issue
Block a user