GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 16-20 lines in 3 locations

includes/class-xcloner-api.php 1 location

@@ 759-774 (lines=16) @@
756
			}
757
		}
758
		
759
		if(isset($data['start']))
760
		{
761
			$return['start'] = $data['start'];
762
			$return['finished'] = 0;	
763
		}else{
764
			if($this->xcloner_file_system->is_multipart($source_backup_file))
765
			{
766
				$return['start'] = 0;
767
				
768
				++$return['part'];
769
			
770
				if($return['part'] < sizeof($backup_parts))	
771
					$return['finished'] = 0;
772
				
773
			}
774
		}	
775
		
776
		$this->send_response($return, 0);
777
	}

restore/xcloner_restore.php 2 locations

@@ 464-479 (lines=16) @@
461
			}
462
		}
463
		
464
		if(isset($data['start']))
465
		{
466
			$return['start'] = $data['start'];
467
			$return['finished'] = 0;	
468
		}else{
469
			if($this->is_multipart($source_backup_file))
470
			{
471
				$return['start'] = 0;
472
				
473
				++$return['part'];
474
			
475
				if($return['part'] < sizeof($backup_parts))	
476
					$return['finished'] = 0;
477
				
478
			}
479
		}	
480
		
481
		$this->send_response(200, $return);
482
	}
@@ 806-825 (lines=20) @@
803
			}
804
		}
805
		
806
		if(isset($data['start']))
807
		//if(isset($data['start']) and $data['start'] <= $this->filesystem->getSize($backup_file))
808
		{
809
			$return['finished'] = 0;
810
			$return['start'] = $data['start'];
811
		}else{
812
			
813
			$return['processed'] += $start;
814
			
815
			if($this->is_multipart($source_backup_file))
816
			{
817
				$return['start'] = 0;
818
				
819
				++$return['part'];
820
			
821
				if($return['part'] < sizeof($backup_parts))	
822
					$return['finished'] = 0;
823
				
824
			}
825
		}
826
		
827
		if($return['finished'])
828
			$this->logger->info(sprintf('Done extracting %s', $source_backup_file));