NotificationEventResource   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
eloc 12
c 1
b 0
f 1
dl 0
loc 34
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A form() 0 3 1
A getRelations() 0 3 1
A table() 0 3 1
A getPages() 0 6 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\NotificationEventResource\Pages\CreateNotificationEvent;
8
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationEventResource\Pages\EditNotificationEvent;
9
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationEventResource\Pages\ListNotificationEvents;
10
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationEventResource\Schemas\NotificationEventForm;
11
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationEventResource\Tables\NotificationEventTable;
12
use Usamamuneerchaudhary\Notifier\Models\NotificationEvent;
13
14
class NotificationEventResource extends Resource
15
{
16
    protected static ?string $model = NotificationEvent::class;
17
18
    protected static string|null|\BackedEnum $navigationIcon = 'heroicon-o-bell-alert';
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...
19
20
    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...
21
22
    protected static ?int $navigationSort = 2;
23
24
25
    public static function form(\Filament\Schemas\Schema $schema): \Filament\Schemas\Schema
26
    {
27
        return NotificationEventForm::configure($schema);
28
    }
29
30
    public static function table(Table $table): Table
31
    {
32
        return NotificationEventTable::configure($table);
33
    }
34
35
    public static function getRelations(): array
36
    {
37
        return [
38
            //
39
        ];
40
    }
41
42
    public static function getPages(): array
43
    {
44
        return [
45
            'index' => ListNotificationEvents::route('/'),
46
            'create' => CreateNotificationEvent::route('/create'),
47
            'edit' => EditNotificationEvent::route('/{record}/edit'),
48
        ];
49
    }
50
}
51