Code Duplication    Length = 3-3 lines in 2 locations

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

core/db_classes/EE_Registration.class.php 1 location

@@ 1511-1513 (lines=3) @@
1508
				break;
1509
			}
1510
		}
1511
		if ( ! ($line_item instanceof \EE_Line_Item && $line_item->OBJ_type() === 'Ticket')) {
1512
			throw new EntityNotFoundException('Line Item Ticket ID', $ticket->ID());
1513
		}
1514
		return $line_item;
1515
	}
1516