Skip to content

Commit

Permalink
Merge pull request #290 from Dmitrev/remove-optional-types-actionerror
Browse files Browse the repository at this point in the history
Fix optional type $description in ActionError can not be set to `null`
  • Loading branch information
l0gicgate authored Aug 1, 2022
2 parents ba0e096 + 0f1af96 commit c8bc550
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Application/Actions/ActionError.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class ActionError implements JsonSerializable

private string $type;

private string $description;
private ?string $description;

public function __construct(string $type, ?string $description)
public function __construct(string $type, ?string $description = null)
{
$this->type = $type;
$this->description = $description;
Expand All @@ -39,7 +39,7 @@ public function setType(string $type): self
return $this;
}

public function getDescription(): string
public function getDescription(): ?string
{
return $this->description;
}
Expand Down

0 comments on commit c8bc550

Please sign in to comment.