mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -153,7 +153,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
||||
$extension,
|
||||
HasWidgetFactoriesExtensionInterface::class,
|
||||
HasWidgetFactoriesExtensionInterface::class,
|
||||
get_class($extensionClass)
|
||||
$extensionClass::class
|
||||
));
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
||||
if (empty($alias)) {
|
||||
throw new LogicException(sprintf(
|
||||
'the widget factory %s returns an empty alias',
|
||||
get_class($factory)
|
||||
$factory::class
|
||||
));
|
||||
}
|
||||
|
||||
@@ -285,13 +285,13 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
||||
if (!is_array($factory->getAllowedPlaces())) {
|
||||
throw new UnexpectedValueException("the method 'getAllowedPlaces' "
|
||||
. 'should return a non-empty array. Unexpected value on ' .
|
||||
get_class($factory));
|
||||
$factory::class);
|
||||
}
|
||||
|
||||
if (count($factory->getAllowedPlaces()) === 0) {
|
||||
throw new LengthException("The method 'getAllowedPlaces' should "
|
||||
. 'return a non-empty array, but returned 0 elements on ' .
|
||||
get_class($factory) . '::getAllowedPlaces()');
|
||||
$factory::class . '::getAllowedPlaces()');
|
||||
}
|
||||
|
||||
// check the alias does not exists yet
|
||||
@@ -365,12 +365,10 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
||||
/**
|
||||
* get the places where the service is allowed.
|
||||
*
|
||||
* @param mixed $place
|
||||
* @param mixed $widgetAlias
|
||||
*
|
||||
* @return unknown
|
||||
*/
|
||||
private function isPlaceAllowedForWidget($place, $widgetAlias, ContainerBuilder $container)
|
||||
private function isPlaceAllowedForWidget(mixed $place, mixed $widgetAlias, ContainerBuilder $container)
|
||||
{
|
||||
if ($this->widgetServices[$widgetAlias] instanceof WidgetFactoryInterface) {
|
||||
if (
|
||||
|
Reference in New Issue
Block a user