NotificationTemplateResource   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
eloc 11
c 1
b 0
f 1
dl 0
loc 23
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPages() 0 6 1
A table() 0 3 1
A form() 0 3 1
1
<?php
2
3
namespace Usamamuneerchaudhary\Notifier\Filament\Resources;
4
5
use Filament\Resources\Resource;
6
use Filament\Tables\Table;
7
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationTemplateResource\Pages\CreateNotificationTemplate;
8
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationTemplateResource\Pages\EditNotificationTemplate;
9
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationTemplateResource\Pages\ListNotificationTemplates;
10
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationTemplateResource\Schemas\NotificationTemplateForm;
11
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationTemplateResource\Tables\NotificationTemplateTable;
12
use Usamamuneerchaudhary\Notifier\Models\NotificationTemplate;
13
14
class NotificationTemplateResource extends Resource
15
{
16
    protected static ?string $model = NotificationTemplate::class;
17
    protected static string|null|\BackedEnum $navigationIcon = 'heroicon-o-document-text';
0 ignored issues
show
Bug introduced by
The type BackedEnum was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
    protected static string|null|\UnitEnum $navigationGroup = 'Notifier';
0 ignored issues
show
Bug introduced by
The type UnitEnum was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
    protected static ?int $navigationSort = 4;
20
21
    public static function form(\Filament\Schemas\Schema $schema): \Filament\Schemas\Schema
22
    {
23
        return NotificationTemplateForm::configure($schema);
24
    }
25
26
    public static function table(Table $table): Table
27
    {
28
        return NotificationTemplateTable::configure($table);
29
    }
30
31
    public static function getPages(): array
32
    {
33
        return [
34
            'index' => ListNotificationTemplates::route('/'),
35
            'create' => CreateNotificationTemplate::route('/create'),
36
            'edit' => EditNotificationTemplate::route('/{record}/edit'),
37
        ];
38
    }
39
}
40