Skip to content

Commit 08c4118

Browse files
authored
Merge pull request #214 from johnproblems/copilot/fix-phpstan-errors-systematic-resolution
Fix TypeError vulnerabilities in notification Livewire components
2 parents ce62715 + e6b6863 commit 08c4118

8 files changed

Lines changed: 616 additions & 6 deletions

File tree

app/Livewire/Notifications/Discord.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Discord extends Component
1313
{
1414
use AuthorizesRequests;
1515

16-
public Team $team;
16+
public ?Team $team = null;
1717

1818
public DiscordNotificationSettings $settings;
1919

app/Livewire/Notifications/Email.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Email extends Component
1818
protected $listeners = ['refresh' => '$refresh'];
1919

2020
#[Locked]
21-
public Team $team;
21+
public ?Team $team = null;
2222

2323
#[Locked]
2424
public EmailNotificationSettings $settings;

app/Livewire/Notifications/Pushover.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Pushover extends Component
1717
protected $listeners = ['refresh' => '$refresh'];
1818

1919
#[Locked]
20-
public Team $team;
20+
public ?Team $team = null;
2121

2222
#[Locked]
2323
public PushoverNotificationSettings $settings;

app/Livewire/Notifications/Slack.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Slack extends Component
1717
protected $listeners = ['refresh' => '$refresh'];
1818

1919
#[Locked]
20-
public Team $team;
20+
public ?Team $team = null;
2121

2222
#[Locked]
2323
public SlackNotificationSettings $settings;

app/Livewire/Notifications/Telegram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Telegram extends Component
1717
protected $listeners = ['refresh' => '$refresh'];
1818

1919
#[Locked]
20-
public Team $team;
20+
public ?Team $team = null;
2121

2222
#[Locked]
2323
public TelegramNotificationSettings $settings;

app/Livewire/Notifications/Webhook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Webhook extends Component
1313
{
1414
use AuthorizesRequests;
1515

16-
public Team $team;
16+
public ?Team $team = null;
1717

1818
public WebhookNotificationSettings $settings;
1919

0 commit comments

Comments
 (0)