Code Duplication    Length = 5-5 lines in 2 locations

classes/class-accommodation.php 2 locations

@@ 791-795 (lines=5) @@
788
	 */
789
	public function set_checkin_checkout($data,$id) {
790
791
		if(!empty($data[0]['features']) && isset($data[0]['features']['check_in_time'])){
792
			$time = str_replace('h',':',$data[0]['features']['check_in_time']);
793
			$time = date('h:ia',strtotime($time));
794
			$this->save_custom_field($time,'checkin_time',$id);
795
		}
796
		if(!empty($data[0]['features']) && isset($data[0]['features']['check_out_time'])){
797
			$time = str_replace('h',':',$data[0]['features']['check_out_time']);
798
			$time = date('h:ia',strtotime($time));
@@ 796-800 (lines=5) @@
793
			$time = date('h:ia',strtotime($time));
794
			$this->save_custom_field($time,'checkin_time',$id);
795
		}
796
		if(!empty($data[0]['features']) && isset($data[0]['features']['check_out_time'])){
797
			$time = str_replace('h',':',$data[0]['features']['check_out_time']);
798
			$time = date('h:ia',strtotime($time));
799
			$this->save_custom_field($time,'checkout_time',$id);
800
		}
801
	}	
802
803
	/**