Code Duplication    Length = 5-5 lines in 2 locations

classes/class-accommodation.php 2 locations

@@ 805-809 (lines=5) @@
802
	 */
803
	public function set_checkin_checkout($data,$id) {
804
805
		if(!empty($data[0]['features']) && isset($data[0]['features']['check_in_time'])){
806
			$time = str_replace('h',':',$data[0]['features']['check_in_time']);
807
			$time = date('h:ia',strtotime($time));
808
			$this->save_custom_field($time,'checkin_time',$id);
809
		}
810
		if(!empty($data[0]['features']) && isset($data[0]['features']['check_out_time'])){
811
			$time = str_replace('h',':',$data[0]['features']['check_out_time']);
812
			$time = date('h:ia',strtotime($time));
@@ 810-814 (lines=5) @@
807
			$time = date('h:ia',strtotime($time));
808
			$this->save_custom_field($time,'checkin_time',$id);
809
		}
810
		if(!empty($data[0]['features']) && isset($data[0]['features']['check_out_time'])){
811
			$time = str_replace('h',':',$data[0]['features']['check_out_time']);
812
			$time = date('h:ia',strtotime($time));
813
			$this->save_custom_field($time,'checkout_time',$id);
814
		}
815
	}	
816
817
	/**