diff --git a/src/App/Controller/Chapter7/CountFollowersController.php b/src/App/Controller/Chapter7/CountFollowersController.php index a0d333b..db33bb0 100644 --- a/src/App/Controller/Chapter7/CountFollowersController.php +++ b/src/App/Controller/Chapter7/CountFollowersController.php @@ -5,8 +5,8 @@ declare(strict_types=1); namespace App\Controller\Chapter7; use Cheeper\AllChapters\DomainModel\Author\AuthorDoesNotExist; -use Cheeper\Chapter7\Application\QueryBus; use Cheeper\Chapter7\Application\Author\Query\CountFollowersQuery; +use Cheeper\Chapter7\Application\QueryBus; use InvalidArgumentException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; diff --git a/src/App/Controller/Chapter7/GetTimelineController.php b/src/App/Controller/Chapter7/GetTimelineController.php index bc238a5..ef74f86 100644 --- a/src/App/Controller/Chapter7/GetTimelineController.php +++ b/src/App/Controller/Chapter7/GetTimelineController.php @@ -5,11 +5,9 @@ declare(strict_types=1); namespace App\Controller\Chapter7; use Cheeper\AllChapters\DomainModel\Author\AuthorDoesNotExist; -use Cheeper\Chapter7\Application\Author\Query\CountFollowersQuery; use Cheeper\Chapter7\Application\Author\Query\TimelineQuery; use Cheeper\Chapter7\Application\QueryBus; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; diff --git a/src/App/Controller/Chapter7/PostCheepController.php b/src/App/Controller/Chapter7/PostCheepController.php index c98256e..f4756fd 100644 --- a/src/App/Controller/Chapter7/PostCheepController.php +++ b/src/App/Controller/Chapter7/PostCheepController.php @@ -8,13 +8,13 @@ use App\Messenger\CommandBus; use Cheeper\AllChapters\DomainModel\Author\AuthorDoesNotExist; use Cheeper\Chapter7\Application\Cheep\Command\PostCheepCommand; use InvalidArgumentException; +use function Safe\json_decode; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\Routing\Annotation\Route; -use function Safe\json_decode; //snippet chapter7-postcheep-controller final class PostCheepController extends AbstractController @@ -69,4 +69,4 @@ final class PostCheepController extends AbstractController } //end-ignore } -//end-snippet \ No newline at end of file +//end-snippet diff --git a/src/App/Controller/Chapter8/GetTimelineController.php b/src/App/Controller/Chapter8/GetTimelineController.php index 67d4555..aeaf84c 100644 --- a/src/App/Controller/Chapter8/GetTimelineController.php +++ b/src/App/Controller/Chapter8/GetTimelineController.php @@ -7,7 +7,6 @@ namespace App\Controller\Chapter8; use Cheeper\Chapter7\Application\Author\Query\TimelineQuery; use Cheeper\Chapter7\Application\QueryBus; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; diff --git a/src/App/Entity/PopularCheep.php b/src/App/Entity/PopularCheep.php index 93ac154..f2397c9 100644 --- a/src/App/Entity/PopularCheep.php +++ b/src/App/Entity/PopularCheep.php @@ -15,7 +15,9 @@ use Ramsey\Uuid\UuidInterface; class PopularCheep { public function __construct( - #[ORM\Id, ORM\GeneratedValue(strategy: "NONE"), ORM\Column(type: UuidType::NAME)] + #[ORM\Id, + ORM\GeneratedValue(strategy: "NONE"), + ORM\Column(type: UuidType::NAME)] private UuidInterface $id, #[ORM\Column(type: UuidType::NAME)] private UuidInterface $authorId, @@ -45,4 +47,4 @@ class PopularCheep { return $this->createdAt; } -} \ No newline at end of file +} diff --git a/src/App/Kernel.php b/src/App/Kernel.php index 184166f..4cf4eed 100644 --- a/src/App/Kernel.php +++ b/src/App/Kernel.php @@ -5,9 +5,7 @@ declare(strict_types=1); namespace App; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\HttpKernel\Kernel as BaseKernel; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; final class Kernel extends BaseKernel { diff --git a/src/App/Repository/PopularCheepRepository.php b/src/App/Repository/PopularCheepRepository.php index 9a4ccb4..d530a7f 100644 --- a/src/App/Repository/PopularCheepRepository.php +++ b/src/App/Repository/PopularCheepRepository.php @@ -5,11 +5,9 @@ declare(strict_types=1); namespace App\Repository; use App\Entity\PopularCheep; -use Cheeper\Chapter7\DomainModel\Author\Author; use Cheeper\Chapter7\DomainModel\Follow\Follow; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; -use function Doctrine\ORM\QueryBuilder; final class PopularCheepRepository extends ServiceEntityRepository { @@ -25,7 +23,7 @@ final class PopularCheepRepository extends ServiceEntityRepository public function of(array $follows): array { return $this->findBy([ - 'id' => array_map(static fn(Follow $f) => $f->toAuthorId()->id(), $follows) + 'id' => array_map(static fn (Follow $f) => $f->toAuthorId()->id(), $follows), ]); } -} \ No newline at end of file +} diff --git a/src/Cheeper/AllChapters/DomainModel/Clock.php b/src/Cheeper/AllChapters/DomainModel/Clock.php index fe53070..1d3a7d1 100644 --- a/src/Cheeper/AllChapters/DomainModel/Clock.php +++ b/src/Cheeper/AllChapters/DomainModel/Clock.php @@ -27,13 +27,15 @@ class Clock return static::$instance; } - public function now(): DateTimeImmutable { + public function now(): DateTimeImmutable + { return $this->strategy->now(); } - public function changeStrategy(ClockStrategy $clockStrategy): self { + public function changeStrategy(ClockStrategy $clockStrategy): self + { $this->strategy = $clockStrategy; return $this; } -} \ No newline at end of file +} diff --git a/src/Cheeper/AllChapters/DomainModel/Clock/ClockStrategy.php b/src/Cheeper/AllChapters/DomainModel/Clock/ClockStrategy.php index 51a34fd..59f8c60 100644 --- a/src/Cheeper/AllChapters/DomainModel/Clock/ClockStrategy.php +++ b/src/Cheeper/AllChapters/DomainModel/Clock/ClockStrategy.php @@ -9,4 +9,4 @@ use DateTimeImmutable; interface ClockStrategy { public function now(): DateTimeImmutable; -} \ No newline at end of file +} diff --git a/src/Cheeper/AllChapters/DomainModel/Clock/DateCollectionClockStrategy.php b/src/Cheeper/AllChapters/DomainModel/Clock/DateCollectionClockStrategy.php index a863251..f8e9d2d 100644 --- a/src/Cheeper/AllChapters/DomainModel/Clock/DateCollectionClockStrategy.php +++ b/src/Cheeper/AllChapters/DomainModel/Clock/DateCollectionClockStrategy.php @@ -12,8 +12,7 @@ class DateCollectionClockStrategy implements ClockStrategy public function __construct( private array $collection = [] - ) - { + ) { $this->iterator = 0; } @@ -28,4 +27,4 @@ class DateCollectionClockStrategy implements ClockStrategy return $currentDate; } -} \ No newline at end of file +} diff --git a/src/Cheeper/AllChapters/DomainModel/Clock/DefaultClockStrategy.php b/src/Cheeper/AllChapters/DomainModel/Clock/DefaultClockStrategy.php index 818fa28..495eb57 100644 --- a/src/Cheeper/AllChapters/DomainModel/Clock/DefaultClockStrategy.php +++ b/src/Cheeper/AllChapters/DomainModel/Clock/DefaultClockStrategy.php @@ -8,7 +8,8 @@ use DateTimeImmutable; class DefaultClockStrategy implements ClockStrategy { - public function now(): DateTimeImmutable { + public function now(): DateTimeImmutable + { return new DateTimeImmutable( 'now', new \DateTimeZone( @@ -16,4 +17,4 @@ class DefaultClockStrategy implements ClockStrategy ) ); } -} \ No newline at end of file +} diff --git a/src/Cheeper/Chapter4/Application/Author/Command/SignUpWithEvents/SignUpCommandHandler.php b/src/Cheeper/Chapter4/Application/Author/Command/SignUpWithEvents/SignUpCommandHandler.php index b3f3e15..6659d9c 100644 --- a/src/Cheeper/Chapter4/Application/Author/Command/SignUpWithEvents/SignUpCommandHandler.php +++ b/src/Cheeper/Chapter4/Application/Author/Command/SignUpWithEvents/SignUpCommandHandler.php @@ -11,9 +11,9 @@ use Cheeper\AllChapters\DomainModel\Author\EmailAddress; use Cheeper\AllChapters\DomainModel\Author\UserName; use Cheeper\AllChapters\DomainModel\Author\Website; use Cheeper\Chapter4\Application\Author\Command\SignUpWithoutEvents\SignUpCommand; +use Cheeper\Chapter4\Application\EventBus; use Cheeper\Chapter4\DomainModel\Author\Author; use Cheeper\Chapter4\DomainModel\Author\AuthorRepository; -use Cheeper\Chapter4\Application\EventBus; //snippet sign-up-handler-with-events final class SignUpCommandHandler diff --git a/src/Cheeper/Chapter4/Application/Cheep/Command/PostCheepCommandHandler.php b/src/Cheeper/Chapter4/Application/Cheep/Command/PostCheepCommandHandler.php index 8fd0394..7b7ba5d 100644 --- a/src/Cheeper/Chapter4/Application/Cheep/Command/PostCheepCommandHandler.php +++ b/src/Cheeper/Chapter4/Application/Cheep/Command/PostCheepCommandHandler.php @@ -8,11 +8,11 @@ use Cheeper\AllChapters\DomainModel\Author\AuthorDoesNotExist; use Cheeper\AllChapters\DomainModel\Author\AuthorId; use Cheeper\AllChapters\DomainModel\Cheep\CheepId; use Cheeper\AllChapters\DomainModel\Cheep\CheepMessage; +use Cheeper\Chapter4\Application\EventBus; use Cheeper\Chapter4\DomainModel\Author\Author; use Cheeper\Chapter4\DomainModel\Author\AuthorRepository; use Cheeper\Chapter4\DomainModel\Cheep\Cheep; use Cheeper\Chapter4\DomainModel\Cheep\CheepRepository; -use Cheeper\Chapter4\Application\EventBus; //snippet post-cheep-handler final class PostCheepCommandHandler diff --git a/src/Cheeper/Chapter4/DomainModel/Cheep/Cheep.php b/src/Cheeper/Chapter4/DomainModel/Cheep/Cheep.php index d6e36c9..8d21ca7 100644 --- a/src/Cheeper/Chapter4/DomainModel/Cheep/Cheep.php +++ b/src/Cheeper/Chapter4/DomainModel/Cheep/Cheep.php @@ -34,8 +34,7 @@ final class Cheep private string $cheepId, private string $authorId, private string $message, - ) - { + ) { $this->date = Clock::instance()->now(); $this->setMessage($message); $this->notifyDomainEvent( @@ -68,7 +67,7 @@ final class Cheep return CheepId::fromString($this->cheepId); } - final public function recomposeWith(CheepMessage $cheepMessage): void + public function recomposeWith(CheepMessage $cheepMessage): void { $this->setMessage($cheepMessage->message()); } diff --git a/src/Cheeper/Chapter4/DomainModel/Follow/Follow.php b/src/Cheeper/Chapter4/DomainModel/Follow/Follow.php index 33f409f..37a2680 100644 --- a/src/Cheeper/Chapter4/DomainModel/Follow/Follow.php +++ b/src/Cheeper/Chapter4/DomainModel/Follow/Follow.php @@ -6,8 +6,8 @@ namespace Cheeper\Chapter4\DomainModel\Follow; use Cheeper\AllChapters\DomainModel\Author\AuthorId; use Cheeper\AllChapters\DomainModel\Follow\FollowId; -use Cheeper\Chapter4\DomainModel\TriggerEventsTrait; use Cheeper\Chapter4\DomainModel\Author\AuthorFollowed; +use Cheeper\Chapter4\DomainModel\TriggerEventsTrait; // snippet follow-entity-with-events class Follow diff --git a/src/Cheeper/Chapter4/Infrastructure/DomainModel/Author/DoctrineOrmAuthorRepository.php b/src/Cheeper/Chapter4/Infrastructure/DomainModel/Author/DoctrineOrmAuthorRepository.php index c15b25d..21e0a57 100644 --- a/src/Cheeper/Chapter4/Infrastructure/DomainModel/Author/DoctrineOrmAuthorRepository.php +++ b/src/Cheeper/Chapter4/Infrastructure/DomainModel/Author/DoctrineOrmAuthorRepository.php @@ -4,9 +4,9 @@ declare(strict_types=1); namespace Cheeper\Chapter4\Infrastructure\DomainModel\Author; -use Cheeper\Chapter4\DomainModel\Author\Author; use Cheeper\AllChapters\DomainModel\Author\AuthorId; use Cheeper\AllChapters\DomainModel\Author\UserName; +use Cheeper\Chapter4\DomainModel\Author\Author; use Cheeper\Chapter4\DomainModel\Author\AuthorRepository; use Doctrine\ORM\EntityManagerInterface; diff --git a/src/Cheeper/Chapter5/Application/Author/Query/CountFollowersQueryHandler/CountFollowersQuery.php b/src/Cheeper/Chapter5/Application/Author/Query/CountFollowersQueryHandler/CountFollowersQuery.php index b5f807e..0b5d122 100644 --- a/src/Cheeper/Chapter5/Application/Author/Query/CountFollowersQueryHandler/CountFollowersQuery.php +++ b/src/Cheeper/Chapter5/Application/Author/Query/CountFollowersQueryHandler/CountFollowersQuery.php @@ -16,8 +16,7 @@ final class CountFollowersQuery implements Query private function __construct( private string $authorId - ) - { + ) { } public function authorId(): string diff --git a/src/Cheeper/Chapter5/Application/Author/Query/CountFollowersQueryHandler/WithRepositoriesAccess/CountFollowersQueryHandler.php b/src/Cheeper/Chapter5/Application/Author/Query/CountFollowersQueryHandler/WithRepositoriesAccess/CountFollowersQueryHandler.php index 32a02d2..8728fb4 100644 --- a/src/Cheeper/Chapter5/Application/Author/Query/CountFollowersQueryHandler/WithRepositoriesAccess/CountFollowersQueryHandler.php +++ b/src/Cheeper/Chapter5/Application/Author/Query/CountFollowersQueryHandler/WithRepositoriesAccess/CountFollowersQueryHandler.php @@ -7,9 +7,9 @@ namespace Cheeper\Chapter5\Application\Author\Query\CountFollowersQueryHandler\W use Cheeper\AllChapters\DomainModel\Author\AuthorDoesNotExist; use Cheeper\AllChapters\DomainModel\Author\AuthorId; use Cheeper\Chapter4\DomainModel\Author\AuthorRepository; +use Cheeper\Chapter4\DomainModel\Follow\FollowRepository; use Cheeper\Chapter5\Application\Author\Query\CountFollowersQueryHandler\CountFollowersQuery; use Cheeper\Chapter5\Application\Author\Query\CountFollowersQueryHandler\CountFollowersResponse; -use Cheeper\Chapter4\DomainModel\Follow\FollowRepository; //snippet count-followers-handler final class CountFollowersQueryHandler diff --git a/src/Cheeper/Chapter6/Application/Author/Command/WithDomainEvents/FollowCommandHandler.php b/src/Cheeper/Chapter6/Application/Author/Command/WithDomainEvents/FollowCommandHandler.php index cf7231f..2d84da8 100644 --- a/src/Cheeper/Chapter6/Application/Author/Command/WithDomainEvents/FollowCommandHandler.php +++ b/src/Cheeper/Chapter6/Application/Author/Command/WithDomainEvents/FollowCommandHandler.php @@ -4,14 +4,14 @@ declare(strict_types=1); namespace Cheeper\Chapter6\Application\Author\Command\WithDomainEvents; -use Cheeper\AllChapters\DomainModel\Follow\FollowDoesAlreadyExistException; -use Cheeper\Chapter6\Application\Author\Command\FollowCommand; use Cheeper\AllChapters\DomainModel\Author\AuthorDoesNotExist; use Cheeper\AllChapters\DomainModel\Author\AuthorId; -use Cheeper\Chapter4\DomainModel\Follow\FollowRepository; -use Cheeper\Chapter4\DomainModel\Author\AuthorRepository; +use Cheeper\AllChapters\DomainModel\Follow\FollowDoesAlreadyExistException; use Cheeper\Chapter4\Application\EventBus; use Cheeper\Chapter4\DomainModel\Author\Author; +use Cheeper\Chapter4\DomainModel\Author\AuthorRepository; +use Cheeper\Chapter4\DomainModel\Follow\FollowRepository; +use Cheeper\Chapter6\Application\Author\Command\FollowCommand; //snippet follow-handler-with-event final class FollowCommandHandler diff --git a/src/Cheeper/Chapter6/Infrastructure/Application/Author/Projection/SymfonyAuthorFollowedEventHandler.php b/src/Cheeper/Chapter6/Infrastructure/Application/Author/Projection/SymfonyAuthorFollowedEventHandler.php index fecf340..0865795 100644 --- a/src/Cheeper/Chapter6/Infrastructure/Application/Author/Projection/SymfonyAuthorFollowedEventHandler.php +++ b/src/Cheeper/Chapter6/Infrastructure/Application/Author/Projection/SymfonyAuthorFollowedEventHandler.php @@ -5,8 +5,8 @@ declare(strict_types=1); namespace Cheeper\Chapter6\Infrastructure\Application\Author\Projection; use Cheeper\Chapter4\DomainModel\Author\AuthorFollowed; -use Cheeper\Chapter6\Application\Author\Projection\CountFollowersProjectionHandler; use Cheeper\Chapter6\Application\Author\Projection\CountFollowersProjection; +use Cheeper\Chapter6\Application\Author\Projection\CountFollowersProjectionHandler; use Symfony\Component\Messenger\Handler\MessageSubscriberInterface; //snippet symfony-author-followed-handler diff --git a/src/Cheeper/Chapter7/Application/Author/Command/FollowCommandHandler.php b/src/Cheeper/Chapter7/Application/Author/Command/FollowCommandHandler.php index 5547499..9b93b6c 100644 --- a/src/Cheeper/Chapter7/Application/Author/Command/FollowCommandHandler.php +++ b/src/Cheeper/Chapter7/Application/Author/Command/FollowCommandHandler.php @@ -54,7 +54,7 @@ final class FollowCommandHandler private function notifyEvents(FollowCommand $command, array $domainEvents): void { $stamppedEvents = array_map( - static fn($event) => $event->stampAsResponseTo($command), + static fn ($event) => $event->stampAsResponseTo($command), $domainEvents ); diff --git a/src/Cheeper/Chapter7/Application/Author/Event/NewAuthorSignedEventHandler.php b/src/Cheeper/Chapter7/Application/Author/Event/NewAuthorSignedEventHandler.php index 90ade16..234d27e 100644 --- a/src/Cheeper/Chapter7/Application/Author/Event/NewAuthorSignedEventHandler.php +++ b/src/Cheeper/Chapter7/Application/Author/Event/NewAuthorSignedEventHandler.php @@ -6,8 +6,6 @@ namespace Cheeper\Chapter7\Application\Author\Event; use Cheeper\Chapter7\Application\Author\Projection\CreateFollowersCounterProjection; use Cheeper\Chapter7\Application\Author\Projection\CreateFollowersCounterProjectionHandlerInterface; -use Cheeper\Chapter7\Application\Author\Projection\CreateTimelineProjection; -use Cheeper\Chapter7\Application\Author\Projection\CreateTimelineProjectionHandlerInterface; use Cheeper\Chapter7\DomainModel\Author\NewAuthorSigned; //snippet new-author-signed-event-handler diff --git a/src/Cheeper/Chapter7/Application/Author/Query/TimelineQueryHandler.php b/src/Cheeper/Chapter7/Application/Author/Query/TimelineQueryHandler.php index 247d050..f05cde4 100644 --- a/src/Cheeper/Chapter7/Application/Author/Query/TimelineQueryHandler.php +++ b/src/Cheeper/Chapter7/Application/Author/Query/TimelineQueryHandler.php @@ -4,9 +4,6 @@ declare(strict_types=1); namespace Cheeper\Chapter7\Application\Author\Query; -use Cheeper\AllChapters\DomainModel\Author\AuthorDoesNotExist; -use Cheeper\AllChapters\DomainModel\Author\AuthorId; - //snippet timeline-handler final class TimelineQueryHandler { diff --git a/src/Cheeper/Chapter7/DomainModel/Cheep/CheepPosted.php b/src/Cheeper/Chapter7/DomainModel/Cheep/CheepPosted.php index 5c4bc40..46fd51c 100644 --- a/src/Cheeper/Chapter7/DomainModel/Cheep/CheepPosted.php +++ b/src/Cheeper/Chapter7/DomainModel/Cheep/CheepPosted.php @@ -44,8 +44,7 @@ final class CheepPosted implements DomainEvent AuthorId $authorId, CheepMessage $cheepMessage, CheepDate $cheepDate, - ): self - { + ): self { return new self( $cheepId->toString(), $authorId->toString(), diff --git a/src/Cheeper/Chapter8/Application/Author/Query/TimelineQueryHandler.php b/src/Cheeper/Chapter8/Application/Author/Query/TimelineQueryHandler.php index 34d700f..f60b813 100644 --- a/src/Cheeper/Chapter8/Application/Author/Query/TimelineQueryHandler.php +++ b/src/Cheeper/Chapter8/Application/Author/Query/TimelineQueryHandler.php @@ -38,7 +38,7 @@ final class TimelineQueryHandler $cheeps[] = [ 'cheep_id' => $popularCheep->getId()->toString(), 'cheep_message' => $popularCheep->getMessage(), - 'cheep_date' => $popularCheep->getCreatedAt()->format(DateTimeInterface::ATOM) + 'cheep_date' => $popularCheep->getCreatedAt()->format(DateTimeInterface::ATOM), ]; } @@ -48,7 +48,7 @@ final class TimelineQueryHandler usort( $cheeps, - function(array $c1, array $c2): int { + function (array $c1, array $c2): int { $date1 = DateTimeImmutable::createFromFormat(DateTimeInterface::ATOM, $c1['cheep_date']); $date2 = DateTimeImmutable::createFromFormat(DateTimeInterface::ATOM, $c2['cheep_date']); return $date1 <=> $date2; diff --git a/src/Cheeper/Chapter8/Application/Cheep/Event/CheepPostedEventHandler.php b/src/Cheeper/Chapter8/Application/Cheep/Event/CheepPostedEventHandler.php index 483434c..b1693ba 100644 --- a/src/Cheeper/Chapter8/Application/Cheep/Event/CheepPostedEventHandler.php +++ b/src/Cheeper/Chapter8/Application/Cheep/Event/CheepPostedEventHandler.php @@ -8,8 +8,8 @@ use Cheeper\AllChapters\DomainModel\Author\AuthorId; use Cheeper\Chapter7\Application\Cheep\Projection\AddCheepToTimelineProjection; use Cheeper\Chapter7\Application\ProjectionBus; use Cheeper\Chapter7\DomainModel\Cheep\CheepPosted; -use Cheeper\Chapter8\DomainModel\Follow\FollowRepository; use Cheeper\Chapter8\Application\Cheep\Projection\AddCheepToGlobalStoreProjection; +use Cheeper\Chapter8\DomainModel\Follow\FollowRepository; use DateTimeImmutable; use DateTimeInterface; diff --git a/src/Cheeper/Chapter8/Application/Cheep/Projection/AddCheepToGlobalStoreProjection.php b/src/Cheeper/Chapter8/Application/Cheep/Projection/AddCheepToGlobalStoreProjection.php index 80add3f..efb0354 100644 --- a/src/Cheeper/Chapter8/Application/Cheep/Projection/AddCheepToGlobalStoreProjection.php +++ b/src/Cheeper/Chapter8/Application/Cheep/Projection/AddCheepToGlobalStoreProjection.php @@ -19,4 +19,4 @@ final class AddCheepToGlobalStoreProjection implements Projection ) { $this->stampAsNewMessage(); } -} \ No newline at end of file +} diff --git a/src/Cheeper/Chapter8/Application/Cheep/Projection/AddCheepToGlobalStoreProjectionHandler.php b/src/Cheeper/Chapter8/Application/Cheep/Projection/AddCheepToGlobalStoreProjectionHandler.php index 6c2b51d..246cf20 100644 --- a/src/Cheeper/Chapter8/Application/Cheep/Projection/AddCheepToGlobalStoreProjectionHandler.php +++ b/src/Cheeper/Chapter8/Application/Cheep/Projection/AddCheepToGlobalStoreProjectionHandler.php @@ -13,8 +13,7 @@ final class AddCheepToGlobalStoreProjectionHandler { public function __construct( private EntityManagerInterface $entityManager, - ) - { + ) { } public function __invoke(AddCheepToGlobalStoreProjection $projection): void @@ -29,4 +28,4 @@ final class AddCheepToGlobalStoreProjectionHandler $this->entityManager->persist($popularCheep); $this->entityManager->flush(); } -} \ No newline at end of file +}