Skip to content

Commit

Permalink
Made username parameter nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
mho22 committed Jul 11, 2024
1 parent fb95e76 commit fff9b03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Notifications/Channels/Discord/DiscordMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DiscordMessage

protected string $url = '';

public function from(string $username = null, string $avatarUrl = null): self
public function from(?string $username = null, ?string $avatarUrl = null): self
{
if (! is_null($username)) {
$this->username = $username;
Expand Down Expand Up @@ -113,7 +113,7 @@ public function fields(array $fields, bool $inline = true): self
public function toArray(): array
{
return [
'username' => $this->username ?? 'Laravel Backup',
'username' => $this->username,
'avatar_url' => $this->avatarUrl,
'embeds' => [
[
Expand Down

0 comments on commit fff9b03

Please sign in to comment.