Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CommandDispatchResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function forCommandHandledByController(Message $dispatedCommand):
return new self($dispatedCommand);
}

private function __construct(Message $dispatchedCommand, string $effectedAggregateId = null, Message ...$recordedEvents)
private function __construct(Message $dispatchedCommand, ?string $effectedAggregateId = null, Message ...$recordedEvents)
{
$this->dispatchedCommand = $dispatchedCommand;
$this->effectedAggregateId = $effectedAggregateId;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/MessageNotFound.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function withMessageName(string $messageName): self
return new self("Unknown message $messageName");
}

public function __construct(string $message = "", Throwable $previous = null)
public function __construct(string $message = "", ?Throwable $previous = null)
{
parent::__construct($message, 404, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class RuntimeException extends \RuntimeException implements MessagingException
{
public function __construct(string $message = "", Throwable $previous = null)
public function __construct(string $message = "", ?Throwable $previous = null)
{
parent::__construct($message, 500, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/MessageBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ final class MessageBag implements Message
* @param \DateTimeImmutable|null $createdAt
* @throws \Exception
*/
public function __construct(string $messageName, string $messageType, $message, $metadata = [], UuidInterface $messageId = null, \DateTimeImmutable $createdAt = null)
public function __construct(string $messageName, string $messageType, $message, $metadata = [], ?UuidInterface $messageId = null, ?\DateTimeImmutable $createdAt = null)
{
if (! \in_array($messageType, self::MSG_TYPES)) {
throw new \InvalidArgumentException('Message type should be one of ' . \implode(', ', self::MSG_TYPES) . ". Got $messageType");
Expand Down