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