Conditions | 3 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.072 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 1 | public function assert(Acl $acl, RoleInterface $role = null, ResourceInterface $resource = null, $privilege = null) |
|
26 | { |
||
27 | 1 | $user = $resource->getInstance(); |
|
1 ignored issue
–
show
|
|||
28 | |||
29 | 1 | if (CurrentUser::get() && CurrentUser::get() === $user) { |
|
30 | return true; |
||
31 | } |
||
32 | |||
33 | 1 | return $acl->reject('it is not himself'); |
|
1 ignored issue
–
show
|
|||
34 | } |
||
36 |