Skip to content

Commit

Permalink
rename webhook event type enum
Browse files Browse the repository at this point in the history
  • Loading branch information
markvaneijk committed Sep 9, 2024
1 parent 355f880 commit 1b59249
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Resources/MailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use Vormkracht10\FilamentMails\Resources\MailResource\Pages\ListMails;
use Vormkracht10\FilamentMails\Resources\MailResource\Pages\ViewMail;
use Vormkracht10\Mails\Actions\ResendMail;
use Vormkracht10\Mails\Enums\WebhookEventType;
use Vormkracht10\Mails\Enums\EventType;
use Vormkracht10\Mails\Models\MailEvent;

class MailResource extends Resource
Expand Down Expand Up @@ -154,14 +154,14 @@ public static function infolist(Infolist $infolist): Infolist
'record' => $record,
'tenant' => filament()->getTenant()?->id,

Check failure on line 155 in src/Resources/MailResource.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to an undefined property Illuminate\Database\Eloquent\Model::$id.
]))
->color(fn (WebhookEventType $state): string => match ($state) {
WebhookEventType::DELIVERY => 'success',
WebhookEventType::CLICK => 'clicked',
WebhookEventType::OPEN => 'success',
WebhookEventType::BOUNCE => 'danger',
WebhookEventType::COMPLAINT => 'danger',
->color(fn (EventType $state): string => match ($state) {

Check failure on line 157 in src/Resources/MailResource.php

View workflow job for this annotation

GitHub Actions / phpstan

Match expression does not handle remaining values: Vormkracht10\Mails\Enums\EventType::ACCEPTED|Vormkracht10\Mails\Enums\EventType::CLICKED|Vormkracht10\Mails\Enums\EventType::COMPLAINED|Vormkracht10\Mails\Enums\EventType::DELIVERED|Vormkracht10\Mails\Enums\EventType::HARD_BOUNCED|Vormkracht10\Mails\Enums\EventType::OPENED|Vormkracht10\Mails\Enums\EventType::SOFT_BOUNCED|Vormkracht10\Mails\Enums\EventType::UNSUBSCRIBED
EventType::DELIVERY => 'success',

Check failure on line 158 in src/Resources/MailResource.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to undefined constant Vormkracht10\Mails\Enums\EventType::DELIVERY.
EventType::CLICK => 'clicked',

Check failure on line 159 in src/Resources/MailResource.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to undefined constant Vormkracht10\Mails\Enums\EventType::CLICK.
EventType::OPEN => 'success',

Check failure on line 160 in src/Resources/MailResource.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to undefined constant Vormkracht10\Mails\Enums\EventType::OPEN.
EventType::BOUNCE => 'danger',

Check failure on line 161 in src/Resources/MailResource.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to undefined constant Vormkracht10\Mails\Enums\EventType::BOUNCE.
EventType::COMPLAINT => 'danger',

Check failure on line 162 in src/Resources/MailResource.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to undefined constant Vormkracht10\Mails\Enums\EventType::COMPLAINT.
})
->formatStateUsing(function (WebhookEventType $state) {
->formatStateUsing(function (EventType $state) {
return ucfirst($state->value);
}),
TextEntry::make('occurred_at')
Expand Down

0 comments on commit 1b59249

Please sign in to comment.