NullAuthProvider::canAuth()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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