original_string: public function createMessage(TicketInterface $ticket = null)
      {
          /* @var TicketMessageInterface $message */
          $message = new $this->ticketMessageClass();
  
          if ($ticket) {
              $message->setPriority($ticket->getPriority());
              $message->setStatus($ticket->getStatus());
              $message->setTicket($ticket);
          } else {
              $message->setStatus(TicketMessage::STATUS_OPEN);
          }
  
          return $message;
      }
code: public function createMessage(TicketInterface $ticket = null)
      {
          /* @var TicketMessageInterface $message */
          $message = new $this->ticketMessageClass();
  
          if ($ticket) {
              $message->setPriority($ticket->getPriority());
              $message->setStatus($ticket->getStatus());
              $message->setTicket($ticket);
          } else {
              $message->setStatus(TicketMessage::STATUS_OPEN);
          }
  
          return $message;
      }
code_tokens: public function createMessage ( TicketInterface $ ticket = null ) { /* @var TicketMessageInterface $message */ $ message = new $ this -> ticketMessageClass ( ) ; if ( $ ticket ) { $ message -> setPriority ( $ ticket -> getPriority ( ) ) ; $ message -> setStatus ( $ ticket -> getStatus ( ) ) ; $ message -> setTicket ( $ ticket ) ; } else { $ message -> setStatus ( TicketMessage :: STATUS_OPEN ) ; } return $ message ; }
docstring: Create a new instance of TicketMessage Entity.
  
  @param TicketInterface $ticket
  
  @return TicketMessageInterface
docstring_tokens: Create a new instance of TicketMessage Entity .