Code Duplication    Length = 9-10 lines in 2 locations

core/business/EE_Registration_Processor.class.php 1 location

@@ 557-565 (lines=9) @@
554
			return false;
555
		}
556
		$ticket = $registration->ticket();
557
		if ( ! $ticket instanceof EE_Ticket ) {
558
			throw new EE_Error(
559
				sprintf(
560
					__( 'The Ticket for Registration %1$d was not found or is invalid.',
561
						'event_espresso' ),
562
					$registration->ticket_ID()
563
				)
564
			);
565
		}
566
		$registration->set_final_price( $ticket->price() );
567
		if ( $update_reg ) {
568
			$registration->save();

core/business/EE_Transaction_Processor.class.php 1 location

@@ 755-764 (lines=10) @@
752
			$transaction->ID(),
753
			$registration->ticket_ID()
754
		);
755
		if ( ! $ticket_line_item instanceof EE_Line_Item ) {
756
			throw new EE_Error(
757
				sprintf(
758
					__( 'The Line Item for Transaction %1$d and Ticket %2$d was not found or is invalid.',
759
						'event_espresso' ),
760
					$transaction->ID(),
761
					$registration->ticket_ID()
762
				)
763
			);
764
		}
765
		return $ticket_line_item;
766
	}
767