Code Duplication    Length = 4-4 lines in 2 locations

classes/class-accommodation.php 2 locations

@@ 1071-1074 (lines=4) @@
1068
	    		delete_post_meta($id,'_thumbnail_id');
1069
	    		add_post_meta($id,'_thumbnail_id',$this->featured_image,true);
1070
1071
	    		if(!empty($this->gallery_meta) && !in_array($this->featured_image,$this->gallery_meta)){
1072
	    			add_post_meta($id,'gallery',$this->featured_image,false);
1073
	    			$this->gallery_meta[] = $this->featured_image;
1074
	    		}
1075
	    	}			
1076
		}	
1077
	}	
@@ 1091-1094 (lines=4) @@
1088
	    		$new_banner = array('banner_image'=>array('cmb-field-0'=>$this->banner_image));
1089
	    		add_post_meta($id,'image_group',$new_banner,true);
1090
1091
	    		if(!empty($this->gallery_meta) && !in_array($this->banner_image,$this->gallery_meta)){
1092
	    			add_post_meta($id,'gallery',$this->banner_image,false);
1093
	    			$this->gallery_meta[] = $this->banner_image;
1094
	    		}
1095
	    	}			
1096
		}	
1097
	}