Code Duplication    Length = 4-4 lines in 2 locations

classes/class-accommodation.php 2 locations

@@ 1102-1105 (lines=4) @@
1099
	    		delete_post_meta($id,'_thumbnail_id');
1100
	    		add_post_meta($id,'_thumbnail_id',$this->featured_image,true);
1101
1102
	    		if(!empty($this->gallery_meta) && !in_array($this->featured_image,$this->gallery_meta)){
1103
	    			add_post_meta($id,'gallery',$this->featured_image,false);
1104
	    			$this->gallery_meta[] = $this->featured_image;
1105
	    		}
1106
	    	}			
1107
		}	
1108
	}	
@@ 1122-1125 (lines=4) @@
1119
	    		$new_banner = array('banner_image'=>array('cmb-field-0'=>$this->banner_image));
1120
	    		add_post_meta($id,'image_group',$new_banner,true);
1121
1122
	    		if(!empty($this->gallery_meta) && !in_array($this->banner_image,$this->gallery_meta)){
1123
	    			add_post_meta($id,'gallery',$this->banner_image,false);
1124
	    			$this->gallery_meta[] = $this->banner_image;
1125
	    		}
1126
	    	}			
1127
		}	
1128
	}