From 41463216b00a606fed3b4767d6ff977fa08d79b3 Mon Sep 17 00:00:00 2001 From: Clemens Krack Date: Fri, 23 Feb 2024 22:33:59 +0100 Subject: [PATCH] chore: Run rector --- config/bundles.php | 22 +++++++++++++++------- config/packages/messenger.php | 9 ++++++--- public/index.php | 4 +--- rector.php | 10 +++++----- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/config/bundles.php b/config/bundles.php index 2614574..16d8052 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -1,11 +1,19 @@ ['all' => true], - Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], - Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], - Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], - Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], - Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], - Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], + FrameworkBundle::class => ['all' => true], + MonologBundle::class => ['all' => true], + MakerBundle::class => ['dev' => true], + TwigBundle::class => ['all' => true], + TwigExtraBundle::class => ['all' => true], + DoctrineBundle::class => ['all' => true], + DoctrineMigrationsBundle::class => ['all' => true], ]; diff --git a/config/packages/messenger.php b/config/packages/messenger.php index 211465a..2ae15fc 100644 --- a/config/packages/messenger.php +++ b/config/packages/messenger.php @@ -1,5 +1,8 @@ messenger() ->bus('messenger.bus.default') - ->middleware()->id(App\Messenger\Middleware\PersistEventMiddleware::class); + ->middleware()->id(PersistEventMiddleware::class); $framework->messenger() // @phpstan-ignore-line - ->routing(App\Event\HydrometerAddedEvent::class) + ->routing(HydrometerAddedEvent::class) ->senders(['sync']); $framework->messenger() // @phpstan-ignore-line - ->routing(App\Event\HydrometerDataReceivedEvent::class) + ->routing(HydrometerDataReceivedEvent::class) ->senders(['sync']); }; diff --git a/public/index.php b/public/index.php index 9982c21..b6ec432 100644 --- a/public/index.php +++ b/public/index.php @@ -4,6 +4,4 @@ require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; -return function (array $context) { - return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); -}; +return fn (array $context) => new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); diff --git a/rector.php b/rector.php index 6c1af5d..5f50f69 100644 --- a/rector.php +++ b/rector.php @@ -8,10 +8,10 @@ return RectorConfig::configure() ->withPaths([ - __DIR__ . '/config', - __DIR__ . '/public', - __DIR__ . '/src', - __DIR__ . '/tests', + __DIR__.'/config', + __DIR__.'/public', + __DIR__.'/src', + __DIR__.'/tests', ]) ->withPhpSets( php83: false, @@ -22,7 +22,7 @@ SetList::CODE_QUALITY, SetList::EARLY_RETURN, ]) - ->withSymfonyContainerPhp(__DIR__. '/var/cache/dev/App_KernelDevDebugContainer.php') + ->withSymfonyContainerPhp(__DIR__.'/var/cache/dev/App_KernelDevDebugContainer.php') ->withImportNames() ->withRules([ AddVoidReturnTypeWhereNoReturnRector::class,