Code Duplication    Length = 8-9 lines in 2 locations

caffeinated/admin/extend/registration_form/Extend_Registration_Form_Admin_Page.core.php 1 location

@@ 549-557 (lines=9) @@
546
		}
547
		// add ID to title if editing
548
		$this->_admin_page_title = $ID ? $this->_admin_page_title . ' # ' . $ID : $this->_admin_page_title;
549
		if($ID){
550
			/** @var EE_Question_Group $questionGroup */
551
			$questionGroup=$this->_question_group_model->get_one_by_ID( $ID);
552
			$additional_hidden_fields=array('QSG_ID'=>array('type'=>'hidden','value'=>$ID));
553
			$this->_set_add_edit_form_tags('update_question_group', $additional_hidden_fields);
554
		}else{
555
			/** @var EE_Question_Group $questionGroup */
556
			$questionGroup = EEM_Question_Group::instance()->create_default_object();
557
			$questionGroup->set_order_to_latest();
558
			$this->_set_add_edit_form_tags('insert_question_group');
559
		}
560
		$this->_template_args['values'] = $this->_yes_no_values;

caffeinated/admin/new/pricing/Pricing_Admin_Page.core.php 1 location

@@ 1033-1040 (lines=8) @@
1030
1031
//		require_once(EE_MODELS . 'EEM_Price_Type.model.php');
1032
1033
		if ( $PRT_ID ) {
1034
			$price_type = EEM_Price_Type::instance()->get_one_by_ID( $PRT_ID );
1035
			$additional_hidden_fields = array( 'PRT_ID' => array( 'type' => 'hidden', 'value' => $PRT_ID ));
1036
			$this->_set_add_edit_form_tags( 'update_price_type', $additional_hidden_fields );
1037
		} else {
1038
			$price_type = EEM_Price_Type::instance()->get_new_price_type();
1039
			$this->_set_add_edit_form_tags( 'insert_price_type' );
1040
		}
1041
1042
		$this->_template_args['PRT_ID'] = $PRT_ID;
1043
		$this->_template_args['price_type'] = $price_type;