public function getTicketId() { if (isset($this->ticket->id) && (int) $this->ticket->id > 0) { return $this->ticket->id; } else { return 0; } }