| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 3.1406 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null) |
||
| 25 | 2 | { |
|
| 26 | $user = $resource->getInstance(); |
||
| 27 | 2 | ||
| 28 | if (CurrentUser::get() && CurrentUser::get() === $user) { |
||
| 29 | 2 | return true; |
|
| 30 | } |
||
| 31 | |||
| 32 | return $acl->reject('it is not himself'); |
||
| 33 | 2 | } |
|
| 40 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.