Skip to content

Commit

Permalink
remove event bus stack & some small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Feb 7, 2024
1 parent 0aa0335 commit f868d3d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 36 deletions.
4 changes: 2 additions & 2 deletions src/Console/InvalidArgumentGiven.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use InvalidArgumentException;

use function gettype;
use function get_debug_type;
use function sprintf;

final class InvalidArgumentGiven extends InvalidArgumentException
Expand All @@ -19,7 +19,7 @@ public function __construct(
sprintf(
'Invalid argument given: need type "%s" got "%s"',
$need,
gettype($value),
get_debug_type($value),
),
);
}
Expand Down
30 changes: 0 additions & 30 deletions src/EventBus/EventBusStackBuilder.php

This file was deleted.

3 changes: 1 addition & 2 deletions src/Outbox/DoctrineOutboxStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ public function retrieveOutboxMessages(int|null $limit = null): array
function (array $data) {
$message = $this->messageSerializer->deserialize($data['message']);

return $message
->withCustomHeader(self::HEADER_OUTBOX_IDENTIFIER, $data['id']);
return $message->withCustomHeader(self::HEADER_OUTBOX_IDENTIFIER, $data['id']);
},
$result,
);
Expand Down
4 changes: 2 additions & 2 deletions src/Outbox/OutboxHeaderIssue.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use RuntimeException;

use function gettype;
use function get_debug_type;
use function sprintf;

final class OutboxHeaderIssue extends RuntimeException
Expand All @@ -18,6 +18,6 @@ public static function missingHeader(string $header): self

public static function invalidHeaderType(mixed $value): self
{
return new self(sprintf('Invalid header given: need type "int" got "%s"', gettype($value)));
return new self(sprintf('Invalid header given: need type "int" got "%s"', get_debug_type($value)));
}
}

0 comments on commit f868d3d

Please sign in to comment.