Code Duplication    Length = 6-6 lines in 2 locations

classes/class-lsx-wetu-importer-accommodation.php 1 location

@@ 752-757 (lines=6) @@
749
				$room_count = count( $data[0]['rooms'] );
750
			}
751
752
			if ( false !== $id && '0' !== $id ) {
753
				$prev_rooms = get_post_meta( $id, 'number_of_rooms', true );
754
				update_post_meta( $id, 'number_of_rooms', $room_count, $prev_rooms );
755
			} else {
756
				add_post_meta( $id, 'number_of_rooms', $room_count, true );
757
			}
758
		}
759
	}
760

classes/class-lsx-wetu-importer.php 1 location

@@ 907-912 (lines=6) @@
904
				'elevation'	=> '',
905
			);
906
907
			if ( false !== $id && '0' !== $id ) {
908
				$prev = get_post_meta( $id,'location',true );
909
				update_post_meta( $id,'location',$location_data,$prev );
910
			} else {
911
				add_post_meta( $id,'location',$location_data,true );
912
			}
913
		}
914
	}
915