Skip to content

Commit

Permalink
Merge branch 'fix-phpstan-issues' of github.com:vormkracht10/filament…
Browse files Browse the repository at this point in the history
…-mails into fix-phpstan-issues
  • Loading branch information
Baspa committed Dec 24, 2024
2 parents 63dd249 + 976c66a commit a03a4eb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
47 changes: 23 additions & 24 deletions src/Resources/MailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,31 @@

namespace Vormkracht10\FilamentMails\Resources;

use Filament\Tables;
use Illuminate\View\View;
use Filament\Tables\Table;
use Filament\Facades\Filament;
use Illuminate\Support\Carbon;
use Filament\Infolists\Infolist;
use Filament\Resources\Resource;
use Illuminate\Support\Collection;
use Filament\Tables\Actions\Action;
use Vormkracht10\Mails\Models\Mail;
use Filament\Infolists\Components\Grid;
use Filament\Infolists\Components\Tabs;
use Illuminate\Database\Eloquent\Model;
use Vormkracht10\Mails\Enums\EventType;
use Filament\Forms\Components\TagsInput;
use Filament\Notifications\Notification;
use Vormkracht10\Mails\Models\MailEvent;
use Filament\Infolists\Components\Grid;
use Filament\Infolists\Components\RepeatableEntry;
use Filament\Infolists\Components\Section;
use Vormkracht10\Mails\Actions\ResendMail;
use Filament\Infolists\Components\Tabs;
use Filament\Infolists\Components\Tabs\Tab;
use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Components\ViewEntry;
use Filament\Infolists\Components\RepeatableEntry;
use Vormkracht10\FilamentMails\Resources\MailResource\Pages\ViewMail;
use Filament\Infolists\Infolist;
use Filament\Notifications\Notification;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Actions\Action;
use Filament\Tables\Table;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Illuminate\View\View;
use Vormkracht10\FilamentMails\Resources\MailResource\Pages\ListMails;
use Vormkracht10\FilamentMails\Resources\MailResource\Pages\ViewMail;
use Vormkracht10\FilamentMails\Resources\MailResource\Widgets\MailStatsWidget;
use Vormkracht10\Mails\Actions\ResendMail;
use Vormkracht10\Mails\Enums\EventType;
use Vormkracht10\Mails\Models\Mail;
use Vormkracht10\Mails\Models\MailEvent;

class MailResource extends Resource
{
Expand Down Expand Up @@ -176,11 +175,11 @@ public static function infolist(Infolist $infolist): Infolist
->url(function (Mail $record) {
$panel = Filament::getCurrentPanel();
$tenant = Filament::getTenant();
if (!$panel || !$tenant) {

if (! $panel || ! $tenant) {
return null;
}

return route('filament.' . $panel->getId() . '.resources.mails.events.view', [
'record' => $record,
'tenant' => $tenant->getKey(),
Expand All @@ -203,11 +202,11 @@ public static function infolist(Infolist $infolist): Infolist
->url(function (MailEvent $record) {
$panel = Filament::getCurrentPanel();
$tenant = Filament::getTenant();
if (!$panel || !$tenant) {

if (! $panel || ! $tenant) {
return null;
}

return route('filament.' . $panel->getId() . '.resources.mails.events.view', [
'record' => $record,
'tenant' => $tenant->getKey(),
Expand Down
6 changes: 3 additions & 3 deletions src/Resources/MailResource/Widgets/MailStatsWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ protected function getStats(): array
$generateUrl = function (string $activeTab): ?string {
$panel = Filament::getCurrentPanel();
$tenant = Filament::getTenant();
if (!$panel || !$tenant) {

if (! $panel || ! $tenant) {
return null;
}

return route('filament.' . $panel->getId() . '.resources.mails.index', [
'activeTab' => $activeTab,
'tenant' => $tenant->getKey(),
Expand Down

0 comments on commit a03a4eb

Please sign in to comment.