| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | 2 | public function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null) |
|
| 27 | { |
||
| 28 | /** @var Bookable $bookable */ |
||
| 29 | 2 | $bookable = $resource->getInstance(); |
|
|
|
|||
| 30 | |||
| 31 | 2 | $bookingType = $bookable->getBookingType(); |
|
| 32 | 2 | if ($bookingType === BookingTypeType::ADMIN_ONLY) { |
|
| 33 | 1 | return true; |
|
| 34 | } |
||
| 35 | |||
| 36 | 1 | return $acl->reject('the booking type for this bookable is not admin only, but : ' . $bookingType); |
|
| 37 | } |
||
| 39 |
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.