| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4.1755 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | 1 | public function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null) |
|
| 28 | { |
||
| 29 | /** @var Booking $booking */ |
||
| 30 | 1 | $booking = $resource->getInstance(); |
|
|
|
|||
| 31 | |||
| 32 | 1 | $bookable = $booking->getBookable(); |
|
| 33 | 1 | if (!$bookable) { |
|
| 34 | return false; |
||
| 35 | } |
||
| 36 | |||
| 37 | 1 | $bookingType = $bookable->getBookingType(); |
|
| 38 | 1 | if ($booking->getStatus() === BookingStatusType::APPLICATION && in_array($bookingType, [BookingTypeType::APPLICATION, BookingTypeType::ADMIN_APPROVED], true)) { |
|
| 39 | 1 | return true; |
|
| 40 | } |
||
| 41 | |||
| 42 | return $acl->reject('you cannot delete a processed application'); |
||
| 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.