code: protected function getTicketFromEvent(ResourceEventInterface $event)
      {
          $ticket = $event->getResource();
  
          if (!$ticket instanceof TicketInterface) {
              throw new UnexpectedValueException("Expected instance of " . TicketInterface::class);
          }
  
          return $ticket;
      }
docs: Returns the ticket from the event.
  
  @param ResourceEventInterface $event
  
  @return TicketInterface