Code Duplication    Length = 10-11 lines in 2 locations

classes/class-accommodation.php 1 location

@@ 424-433 (lines=10) @@
421
			}
422
423
            $jdata = file_get_contents( $this->url . '/Get?' . $this->url_qs . '&ids=' . $wetu_id );
424
            if($jdata)
425
            {
426
                $adata=json_decode($jdata,true);
427
                if(!empty($adata))
428
                {
429
                	$return = $this->import_row($adata,$wetu_id,$post_id,$team_members,$content,$safari_brands);
430
                	$this->format_completed_row($return);
431
					$this->cleanup_posts();
432
                }
433
            }
434
		}
435
	}
436

classes/class-tours.php 1 location

@@ 483-493 (lines=11) @@
480
481
            $jdata=file_get_contents("http://wetu.com/API/Itinerary/V7/Get?id=".$wetu_id);
482
483
            if($jdata)
484
            {
485
				$jdata=json_decode($jdata,true);
486
                if(!empty($jdata))
487
                {
488
                	$return = $this->import_row($jdata,$wetu_id,$post_id,$content);
489
                	$this->format_completed_row($return);
490
                	$this->cleanup_posts();
491
                	$this->attach_destination_images($content);
492
                }
493
            }
494
		}
495
	}
496