Code Duplication    Length = 11-12 lines in 2 locations

classes/class-accommodation.php 1 location

@@ 437-447 (lines=11) @@
434
			}
435
436
            $jdata = file_get_contents( $this->url . '/Get?' . $this->url_qs . '&ids=' . $wetu_id );
437
            if($jdata)
438
            {
439
                $adata=json_decode($jdata,true);
440
                if(!empty($adata))
441
                {
442
                	$return = $this->import_row($adata,$wetu_id,$post_id,$team_members,$content,$safari_brands);
443
                	$this->format_completed_row($return);
444
                	$this->remove_from_queue($return);
445
					$this->cleanup_posts();
446
                }
447
            }
448
		}
449
	}
450

classes/class-tours.php 1 location

@@ 530-541 (lines=12) @@
527
528
            $jdata=file_get_contents("http://wetu.com/API/Itinerary/V7/Get?id=".$wetu_id);
529
530
            if($jdata)
531
            {
532
				$jdata=json_decode($jdata,true);
533
                if(!empty($jdata))
534
                {
535
                	$return = $this->import_row($jdata,$wetu_id,$post_id,$content);
536
                	$this->format_completed_row($return);
537
					$this->save_queue();
538
                	$this->cleanup_posts();
539
                	$this->attach_destination_images($content);
540
                }
541
            }
542
		}
543
	}
544