| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 3 | public function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null) |
|
| 31 | { |
||
| 32 | /** @var AccountingDocument $instance */ |
||
| 33 | 3 | $instance = $resource->getInstance(); |
|
|
|
|||
| 34 | 3 | $expenseClaim = $instance->getExpenseClaim(); |
|
| 35 | |||
| 36 | 3 | if (!$expenseClaim) { |
|
| 37 | return true; |
||
| 38 | } |
||
| 39 | |||
| 40 | 3 | $assertion = new StatusIsNew(); |
|
| 41 | |||
| 42 | 3 | return $assertion->assert($acl, $role, new ModelResource(ExpenseClaim::class, $expenseClaim), $privilege); |
|
| 43 | } |
||
| 45 |
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.