update patch 1

This commit is contained in:
fiqhpratama
2024-12-02 01:18:34 +07:00
parent 453d9bb470
commit 25026b0a85
3380 changed files with 103529 additions and 363623 deletions
+8 -12
View File
@@ -24,21 +24,17 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
final class MessageEvent extends Event
{
private RawMessage $message;
private Envelope $envelope;
private string $transport;
private bool $queued;
private bool $rejected = false;
/** @var StampInterface[] */
private array $stamps = [];
public function __construct(RawMessage $message, Envelope $envelope, string $transport, bool $queued = false)
{
$this->message = $message;
$this->envelope = $envelope;
$this->transport = $transport;
$this->queued = $queued;
public function __construct(
private RawMessage $message,
private Envelope $envelope,
private string $transport,
private bool $queued = false,
) {
}
public function getMessage(): RawMessage
@@ -85,7 +81,7 @@ final class MessageEvent extends Event
public function addStamp(StampInterface $stamp): void
{
if (!$this->queued) {
throw new LogicException(sprintf('Cannot call "%s()" on a message that is not meant to be queued.', __METHOD__));
throw new LogicException(\sprintf('Cannot call "%s()" on a message that is not meant to be queued.', __METHOD__));
}
$this->stamps[] = $stamp;
@@ -97,7 +93,7 @@ final class MessageEvent extends Event
public function getStamps(): array
{
if (!$this->queued) {
throw new LogicException(sprintf('Cannot call "%s()" on a message that is not meant to be queued.', __METHOD__));
throw new LogicException(\sprintf('Cannot call "%s()" on a message that is not meant to be queued.', __METHOD__));
}
return $this->stamps;