Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 766-771 (lines=6) @@
763
				$room_count = count( $data[0]['rooms'] );
764
			}
765
766
			if ( false !== $id && '0' !== $id ) {
767
				$prev_rooms = get_post_meta( $id, 'number_of_rooms', true );
768
				update_post_meta( $id, 'number_of_rooms', $room_count, $prev_rooms );
769
			} else {
770
				add_post_meta( $id, 'number_of_rooms', $room_count, true );
771
			}
772
		}
773
	}
774

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

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