diff --git a/composer.json b/composer.json index 6b5b4c7..5db3939 100644 --- a/composer.json +++ b/composer.json @@ -31,12 +31,15 @@ "backstage/laravel-mails": "self.version" }, "require-dev": { + "larastan/larastan": "^3.0", "laravel/pint": "^1.16", "nunomaduro/collision": "^8.8.0", "orchestra/testbench": "^9.0|^10.0", "pestphp/pest": "^3.7", "pestphp/pest-plugin-arch": "^3.1.0", - "pestphp/pest-plugin-laravel": "^3.0" + "pestphp/pest-plugin-laravel": "^3.0", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan-deprecation-rules": "^2.0" }, "autoload": { "psr-4": { @@ -81,4 +84,4 @@ "url": "git@github.com:backstagephp/laravel-mails.git" } } -} \ No newline at end of file +} diff --git a/src/Resources/EventResource.php b/src/Resources/EventResource.php index cad0ca3..762a6b5 100644 --- a/src/Resources/EventResource.php +++ b/src/Resources/EventResource.php @@ -98,6 +98,7 @@ public static function infolist(Schema $schema): Schema EventType::COMPLAINED => 'warning', EventType::UNSUBSCRIBED => 'danger', EventType::ACCEPTED => 'success', + default => 'gray', }) ->formatStateUsing(function (EventType $state) { return ucwords(str_replace('_', ' ', $state->value)); @@ -224,6 +225,7 @@ public static function table(Table $table): Table EventType::COMPLAINED => 'warning', EventType::UNSUBSCRIBED => 'danger', EventType::ACCEPTED => 'success', + default => 'gray', }) ->formatStateUsing(function (EventType $state) { return ucwords(str_replace('_', ' ', $state->value)); diff --git a/src/Resources/MailResource.php b/src/Resources/MailResource.php index ab6d281..f18deb4 100644 --- a/src/Resources/MailResource.php +++ b/src/Resources/MailResource.php @@ -231,6 +231,7 @@ public static function infolist(Schema $schema): Schema EventType::COMPLAINED => 'warning', EventType::UNSUBSCRIBED => 'danger', EventType::ACCEPTED => 'success', + default => 'gray', }) ->formatStateUsing(function (EventType $state) { return ucfirst($state->value);