GetAdmins   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 16
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 3
1
<?php
2
3
namespace EasyPanel\Commands\UserActions;
4
5
use EasyPanel\Support\Contract\UserProviderFacade;
6
use Illuminate\Console\Command;
7
8
class GetAdmins extends Command
9
{
10
11
    protected $description = 'Get Admins list';
12
    protected $signature = 'panel:admins';
13
14
    public function handle()
15
    {
16
        $admins = UserProviderFacade::getAdmins();
17
        $this->warn('Admin Lists :');
18
        foreach ($admins as $admin){
19
            $message = $admin->panelAdmin->is_superuser
20
                ? "• {$admin->name}: {$admin->email} ( Super Admin ✅ )"
21
                : "• {$admin->name}: {$admin->email}";
22
23
            $this->warn($message);
24
        }
25
    }
26
}
27