Skip to content

Commit

Permalink
chore: Run rector
Browse files Browse the repository at this point in the history
  • Loading branch information
ckrack committed Feb 23, 2024
1 parent 545d966 commit 4146321
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 18 deletions.
22 changes: 15 additions & 7 deletions config/bundles.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<?php

use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\MakerBundle\MakerBundle;
use Symfony\Bundle\MonologBundle\MonologBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
use Twig\Extra\TwigExtraBundle\TwigExtraBundle;

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['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],
];
9 changes: 6 additions & 3 deletions config/packages/messenger.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

use App\Event\HydrometerAddedEvent;
use App\Event\HydrometerDataReceivedEvent;
use App\Messenger\Middleware\PersistEventMiddleware;
use Symfony\Config\FrameworkConfig;

return static function (FrameworkConfig $framework): void {
Expand All @@ -9,13 +12,13 @@

$framework->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']);
};
4 changes: 1 addition & 3 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
10 changes: 5 additions & 5 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 4146321

Please sign in to comment.