| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 4 | public function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null) |
|
| 32 | 4 | { |
|
| 33 | /** @var ExpenseClaim $expenseClaim */ |
||
| 34 | $expenseClaim = $resource->getInstance(); |
||
| 35 | 2 | ||
| 36 | if ($expenseClaim->getStatus() === ExpenseClaimStatusType::NEW) { |
||
| 37 | return true; |
||
| 38 | } |
||
| 39 | |||
| 40 | return $acl->reject('the expense claim status is not new but instead: ' . $expenseClaim->getStatus()); |
||
| 41 | } |
||
| 43 |
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.