Rector changes and immplementations of required methods

This commit is contained in:
2025-05-22 17:47:07 +02:00
parent 053b92b77c
commit 17db59d221
1138 changed files with 2656 additions and 2616 deletions

View File

@@ -102,7 +102,7 @@ class ChillMainExtension extends Extension implements
*/
protected $widgetFactories = [];
public function addWidgetFactory(WidgetFactoryInterface $factory)
public function addWidgetFactory(WidgetFactoryInterface $factory): void
{
$this->widgetFactories[] = $factory;
}
@@ -123,7 +123,7 @@ class ChillMainExtension extends Extension implements
/**
* @throws \Exception
*/
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
// configuration for main bundle
$configuration = $this->getConfiguration($configs, $container);
@@ -232,7 +232,7 @@ class ChillMainExtension extends Extension implements
// $this->configureSms($config['short_messages'], $container, $loader);
}
public function prepend(ContainerBuilder $container)
public function prepend(ContainerBuilder $container): void
{
$this->prependNotifierTexterWithLegacyData($container);

View File

@@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Reference;
class ACLFlagsCompilerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$permissionGroupType = $container->getDefinition(PermissionsGroupType::class);

View File

@@ -28,7 +28,7 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class ExportsCompilerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->has(ExportManager::class)) {
throw new \LogicException('service '.ExportManager::class.' is not defined. It is required by ExportsCompilerPass');
@@ -45,7 +45,7 @@ class ExportsCompilerPass implements CompilerPassInterface
private function compileExportElementsProvider(
Definition $chillManagerDefinition,
ContainerBuilder $container,
) {
): void {
$taggedServices = $container->findTaggedServiceIds(
'chill.export_elements_provider'
);
@@ -74,7 +74,7 @@ class ExportsCompilerPass implements CompilerPassInterface
private function compileFormatters(
Definition $chillManagerDefinition,
ContainerBuilder $container,
) {
): void {
$taggedServices = $container->findTaggedServiceIds(
'chill.export_formatter'
);

View File

@@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Reference;
class MenuCompilerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('chill.main.menu_composer')) {
throw new \LogicException(sprintf('The service %s does not exists in container.', MenuComposer::class));

View File

@@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Reference;
class NotificationCounterCompilerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition(CountNotificationUser::class)) {
throw new \LogicException('The service '.CountNotificationUser::class.' should be defined');

View File

@@ -22,7 +22,7 @@ class SearchableServicesCompilerPass implements CompilerPassInterface
*
* @see \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::process()
*/
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('chill_main.search_provider')) {
throw new \LogicException('service chill_main.search_provider is not defined.');

View File

@@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class TimelineCompilerClass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('chill_main.timeline_builder')) {
throw new \LogicException('service chill_main.timeline_builder is not defined.');

View File

@@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
*/
class WidgetsCompilerPass extends AbstractWidgetsCompilerPass
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$this->doProcess($container, 'chill_main', 'chill_main.widgets');
}

View File

@@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
*/
class ConfigConsistencyCompilerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$availableLanguages = $container
->getParameter('chill_main.available_languages');

View File

@@ -123,7 +123,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
ContainerBuilder $container,
$extension,
$containerWidgetConfigParameterName,
) {
): void {
if (!$container->hasDefinition(self::WIDGET_MANAGER)) {
throw new \LogicException('the service '.self::WIDGET_MANAGER.' should be present. It is required by '.self::class);
}

View File

@@ -124,7 +124,7 @@ trait AddWidgetConfigurationTrait
/**
* @param WidgetFactoryInterface[] $widgetFactories
*/
public function setWidgetFactories(array $widgetFactories)
public function setWidgetFactories(array $widgetFactories): void
{
$this->widgetFactories = $widgetFactories;
}