Code Duplication    Length = 3-3 lines in 2 locations

core/db_classes/EE_Registration.class.php 1 location

@@ 1360-1362 (lines=3) @@
1357
				break;
1358
			}
1359
		}
1360
		if ( ! ($line_item instanceof \EE_Line_Item && $line_item->OBJ_type() === 'Ticket')) {
1361
			throw new EntityNotFoundException('Line Item Ticket ID', $ticket->ID());
1362
		}
1363
		return $line_item;
1364
	}
1365

core/domain/services/ticket/CancelTicketLineItemService.php 1 location

@@ 133-135 (lines=3) @@
130
                break;
131
            }
132
        }
133
        if ( ! ($line_item instanceof \EE_Line_Item && $line_item->OBJ_type() === 'Ticket')) {
134
            throw new EntityNotFoundException('Line Item Ticket ID', $ticket->ID());
135
        }
136
        return $line_item;
137
    }
138