NullAuthProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A canAuth() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AlgoWeb\PODataLaravel\Auth;
6
7
use AlgoWeb\PODataLaravel\Enums\ActionVerb;
8
use AlgoWeb\PODataLaravel\Interfaces\AuthInterface;
9
use Illuminate\Database\Eloquent\Model;
10
use Illuminate\Database\Eloquent\Relations\Relation;
11
12
class NullAuthProvider implements AuthInterface
13
{
14
    /**
15
     * Is the requester permitted to perform the requested action on the model class (and instance, if supplied)?
16
     *
17
     * @param ActionVerb          $verb
18
     * @param class-string|null   $modelname Model class to access
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string|null at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string|null.
Loading history...
19
     * @param Model|Relation|null $model     Specific model or relation to access
20
     *
21
     * @return bool
22
     */
23
    public function canAuth(ActionVerb $verb, $modelname, $model = null)
24
    {
25
        return true;
26
    }
27
}
28