RoleAuthorizerMiddleware   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A authorized() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author enea dhack <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Enea\Authorization\Middleware;
13
14
use Enea\Authorization\Facades\Authenticated;
15
16
class RoleAuthorizerMiddleware extends AuthorizerMiddleware
17
{
18 4
    protected function authorized(array $grantable): void
19
    {
20 4
        Authenticated::is(...$grantable);
0 ignored issues
show
Bug introduced by
The method is() does not exist on Enea\Authorization\Facades\Authenticated. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        Authenticated::/** @scrutinizer ignore-call */ 
21
                       is(...$grantable);
Loading history...
21 2
    }
22
}
23