AdminIdentifier::check()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace EasyPanel\Support\Auth;
4
5
use EasyPanel\Support\Contract\UserProviderFacade;
6
7
class AdminIdentifier
8
{
9
10
    public function check($userId)
11
    {
12
        $user = UserProviderFacade::findUser($userId);
13
14
        return $user->panelAdmin()->exists();
15
    }
16
17
}
18