Passed
Push — develop ( 97f65e...d0561f )
by Enea
03:00
created

Authorizer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 8
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0

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\HasRole;
0 ignored issues
show
Bug introduced by
The type Enea\Authorization\Traits\HasRole 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...
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 | HasRole $owner, string $permission)
25
 * @method static bool canAny(PermissionsOwner | Authorizable | HasRole $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
    protected static function getFacadeAccessor()
35
    {
36
        return \Enea\Authorization\Authorizer::class;
37
    }
38
}
39