@@ 118-127 (lines=10) @@ | ||
115 | 'Ticket', |
|
116 | array($ticket->ID()) |
|
117 | ); |
|
118 | foreach ($ticket_line_items as $ticket_line_item) { |
|
119 | if ($ticket_line_item instanceof \EE_Line_Item |
|
120 | && $ticket_line_item->OBJ_type() === 'Ticket' |
|
121 | && $ticket_line_item->OBJ_ID() === $ticket->ID() |
|
122 | ) { |
|
123 | $line_item = $ticket_line_item; |
|
124 | break; |
|
125 | } |
|
126 | } |
|
127 | if (! ($line_item instanceof \EE_Line_Item && $line_item->OBJ_type() === 'Ticket')) { |
|
128 | throw new EntityNotFoundException('Line Item Ticket ID', $ticket->ID()); |
|
129 | } |
|
130 | return $line_item; |
@@ 1913-1922 (lines=10) @@ | ||
1910 | 'Ticket', |
|
1911 | array($ticket->ID()) |
|
1912 | ); |
|
1913 | foreach ($ticket_line_items as $ticket_line_item) { |
|
1914 | if ($ticket_line_item instanceof \EE_Line_Item |
|
1915 | && $ticket_line_item->OBJ_type() === 'Ticket' |
|
1916 | && $ticket_line_item->OBJ_ID() === $ticket->ID() |
|
1917 | ) { |
|
1918 | $line_item = $ticket_line_item; |
|
1919 | break; |
|
1920 | } |
|
1921 | } |
|
1922 | if (! ($line_item instanceof \EE_Line_Item && $line_item->OBJ_type() === 'Ticket')) { |
|
1923 | throw new EntityNotFoundException('Line Item Ticket ID', $ticket->ID()); |
|
1924 | } |
|
1925 | return $line_item; |