| @@ 55-63 (lines=9) @@ | ||
| 52 | } |
|
| 53 | ||
| 54 | // Check if a code is given to the validator |
|
| 55 | if (!isset($ticketCode)) { |
|
| 56 | return $result = array( |
|
| 57 | 'Code' => self::MESSAGE_NO_CODE, |
|
| 58 | 'Message' => self::message(self::MESSAGE_NO_CODE, $ticketCode), |
|
| 59 | 'Type' => self::MESSAGE_TYPE_BAD, |
|
| 60 | 'Ticket' => $ticketCode, |
|
| 61 | 'Attendee' => null |
|
| 62 | ); |
|
| 63 | } |
|
| 64 | ||
| 65 | // Check if a ticket exists with the given ticket code |
|
| 66 | if (!$this->attendee = Attendee::get()->find('TicketCode', $ticketCode)) { |
|
| @@ 112-120 (lines=9) @@ | ||
| 109 | } |
|
| 110 | ||
| 111 | // Successfully checked in |
|
| 112 | else { |
|
| 113 | return $result = array( |
|
| 114 | 'Code' => self::MESSAGE_CHECK_IN_SUCCESS, |
|
| 115 | 'Message' => self::message(self::MESSAGE_CHECK_IN_SUCCESS, $name), |
|
| 116 | 'Type' => self::MESSAGE_TYPE_GOOD, |
|
| 117 | 'Ticket' => $ticketCode, |
|
| 118 | 'Attendee' => $this->attendee |
|
| 119 | ); |
|
| 120 | } |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|