Authorizer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFacadeAccessor() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Created on 04/03/18 by enea dhack.
7
 */
8
9
namespace Enea\Authorization\Facades;
10
11
use Enea\Authorization\Contracts\{
12
    PermissionsOwner, RolesOwner
13
};
14
use Enea\Authorization\Traits\Authorizable;
15
use Enea\Authorization\Traits\isRole;
16
use Illuminate\Support\Facades\Facade;
17
18
/**
19
 * Class Authorizer.
20
 *
21
 * @package Enea\Authorization\Facades
22
 * @author enea dhack <[email protected]>
23
 *
24
 * @method static bool can(PermissionsOwner | Authorizable | isRole $owner, string $permission)
25
 * @method static bool canAny(PermissionsOwner | Authorizable | isRole $owner, array $permissions)
26
 * @method static bool is(RolesOwner | Authorizable $owner, string $role)
27
 * @method static bool isAny(RolesOwner | Authorizable $owner, array $roles)
28
 */
29
class Authorizer extends Facade
30
{
31
    /**
32
     * {@inheritdoc}
33
     */
34 33
    protected static function getFacadeAccessor()
35
    {
36 33
        return \Enea\Authorization\Authorizer::class;
37
    }
38
}
39