Skip to content

Commit

Permalink
chore: add psalm in all code dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Oct 3, 2023
1 parent de85b86 commit 162a426
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use AMQPEnvelope;
use AMQPQueue;
use AMQPQueueException;
use CodelyTv\Shared\Domain\Bus\Event\DomainEventSubscriber;
use CodelyTv\Shared\Infrastructure\Bus\Event\DomainEventJsonDeserializer;
use Throwable;

Expand All @@ -22,7 +23,7 @@ public function __construct(
private int $maxRetries
) {}

public function consume(callable $subscriber, string $queueName): void
public function consume(callable|DomainEventSubscriber $subscriber, string $queueName): void
{
try {
$this->connection->queue($queueName)->consume($this->consumer($subscriber));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;
use Symfony\Component\Messenger\Stamp\HandledStamp;

final class InMemorySymfonyQueryBus implements QueryBus
final readonly class InMemorySymfonyQueryBus implements QueryBus
{
private readonly MessageBus $bus;
private MessageBus $bus;

public function __construct(iterable $queryHandlers)
{
Expand Down
1 change: 1 addition & 0 deletions tests/Shared/Infrastructure/PhpUnit/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ protected function assertAskResponse(Response $expected, Query $query, callable
$this->assertEquals($expected, $actual);
}

/** @param class-string<\Throwable> $expectedErrorClass */
protected function assertAskThrowsException(string $expectedErrorClass, Query $query, callable $queryHandler): void
{
$this->expectException($expectedErrorClass);
Expand Down

0 comments on commit 162a426

Please sign in to comment.