mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-05 12:59:44 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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'
|
||||
);
|
||||
|
@@ -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));
|
||||
|
@@ -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');
|
||||
|
@@ -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.');
|
||||
|
@@ -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.');
|
||||
|
@@ -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');
|
||||
}
|
||||
|
@@ -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');
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -124,7 +124,7 @@ trait AddWidgetConfigurationTrait
|
||||
/**
|
||||
* @param WidgetFactoryInterface[] $widgetFactories
|
||||
*/
|
||||
public function setWidgetFactories(array $widgetFactories)
|
||||
public function setWidgetFactories(array $widgetFactories): void
|
||||
{
|
||||
$this->widgetFactories = $widgetFactories;
|
||||
}
|
||||
|
Reference in New Issue
Block a user