Authorizer::getFacadeAccessor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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