Code Duplication    Length = 12-12 lines in 3 locations

web_interface/astpp/application/modules/did/controllers/did.php 1 location

@@ 548-559 (lines=12) @@
545
		return true;
546
	}
547
548
	function did_download_sample_file($file_name) {
549
		$this->load->helper('download');
550
		$full_path = base_url() . "assets/Rates_File/" . $file_name . ".csv";
551
		$arrContextOptions=array(
552
			"ssl"=>array(
553
			"verify_peer"=>false,
554
			"verify_peer_name"=>false,
555
			),
556
		);  
557
		$file = file_get_contents($full_path, false, stream_context_create($arrContextOptions));
558
		force_download("samplefile.csv", $file);
559
	}
560
	/* -------Here we write code for controller did functions did_import------
561
     * @Purpose this function check if account number exist or not then remove from database.
562
     * @params $account_number: Account Number

web_interface/astpp/application/modules/package/controllers/package.php 1 location

@@ 337-348 (lines=12) @@
334
	}
335
    
336
    
337
	function package_patterns_download_sample_file($file_name){
338
		$this->load->helper('download');
339
		$full_path = base_url()."assets/Rates_File/".$file_name.".csv";
340
		$arrContextOptions=array(
341
			"ssl"=>array(
342
			"verify_peer"=>false,
343
			"verify_peer_name"=>false,
344
			),
345
		);  
346
		$file = file_get_contents($full_path, false, stream_context_create($arrContextOptions));
347
		force_download("samplefile.csv", $file); 
348
	}
349
    
350
    
351
	function package_patterns_preview_file($edit_id){

web_interface/astpp/application/modules/rates/controllers/rates.php 1 location

@@ 692-703 (lines=12) @@
689
		$this->session->set_userdata('advance_search', 0);
690
		$this->session->set_userdata('account_search', "");
691
	}
692
	function customer_rates_download_sample_file($file_name){
693
		$this->load->helper('download');
694
		$full_path = base_url()."assets/Rates_File/".$file_name.".csv";
695
		$arrContextOptions=array(
696
			"ssl"=>array(
697
			"verify_peer"=>false,
698
			"verify_peer_name"=>false,
699
			),
700
		);  
701
		$file = file_get_contents($full_path, false, stream_context_create($arrContextOptions));
702
		force_download("samplefile.csv", $file); 
703
	}
704
	function termination_rate_batch_update(){
705
		$batch_update_arr = $this->input->post();
706
	$batch_update_arr["cost"]["cost"] = isset($batch_update_arr["cost"]["cost"])?$this->common_model->add_calculate_currency($batch_update_arr["cost"]["cost"], '', '', true, false):"0.0000";