Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null) |
||
27 | { |
||
28 | /** @var Booking $booking */ |
||
29 | $booking = $resource->getInstance(); |
||
|
|||
30 | |||
31 | if (!$booking->getBookable()) { |
||
32 | return true; |
||
33 | } |
||
34 | |||
35 | if ($booking->getBookable()->getBookingType() === BookingTypeType::SELF_APPROVED) { |
||
36 | return true; |
||
37 | } |
||
38 | |||
39 | return $acl->reject('the bookable type for this booking is not self approved, but : ' . $booking->getBookable()->getBookingType()); |
||
40 | } |
||
42 |
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.