Code Duplication    Length = 6-6 lines in 3 locations

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

@@ 272-277 (lines=6) @@
269
			$searched_items = false;
270
271
			// @codingStandardsIgnoreLine
272
			if ( isset( $_POST['keyword'] ) ) {
273
				// @codingStandardsIgnoreLine
274
				$keyphrases = $_POST['keyword'];
275
			} else {
276
				$keyphrases = array( 0 );
277
			}
278
279
			if ( ! is_array( $keyphrases ) ) {
280
				$keyphrases = array( $keyphrases );

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

@@ 327-332 (lines=6) @@
324
			$searched_items = false;
325
326
			// @codingStandardsIgnoreLine
327
			if ( isset( $_POST['keyword'] ) ) {
328
				// @codingStandardsIgnoreLine
329
				$keyphrases = $_POST['keyword'];
330
			} else {
331
				$keyphrases = array( 0 );
332
			}
333
334
			if ( ! is_array( $keyphrases ) ) {
335
				$keyphrases = array( $keyphrases );

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

@@ 302-307 (lines=6) @@
299
				$searched_items = false;
300
301
				// @codingStandardsIgnoreLine
302
				if ( isset( $_POST['keyword'] ) ) {
303
					// @codingStandardsIgnoreLine
304
					$keyphrases = $_POST['keyword'];
305
				} else {
306
					$keyphrases = array( 0 );
307
				}
308
309
				if ( ! is_array( $keyphrases ) ) {
310
					$keyphrases = array( $keyphrases );