mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 07:17:30 -04:00 
			
		
		
		
	Return early from try block
This commit is contained in:
		
							parent
							
								
									a272956df2
								
							
						
					
					
						commit
						e63b3cb76a
					
				| @ -176,18 +176,22 @@ class StepsController extends BaseController | ||||
|             ); | ||||
|         } | ||||
| 
 | ||||
|         $migrationData = $this->generateMigrationData($request->all()); | ||||
|         try { | ||||
|             $migrationData = $this->generateMigrationData($request->all()); | ||||
| 
 | ||||
|         $completeService = (new CompleteService(session('MIGRATION_ACCOUNT_TOKEN'))) | ||||
|             ->data($migrationData) | ||||
|             ->endpoint(session('MIGRATION_ENDPOINT')) | ||||
|             ->start(); | ||||
| 
 | ||||
|         if ($completeService->isSuccessful()) { | ||||
|             return view('migration.completed'); | ||||
|             $completeService = (new CompleteService(session('MIGRATION_ACCOUNT_TOKEN'))) | ||||
|                 ->data($migrationData) | ||||
|                 ->endpoint(session('MIGRATION_ENDPOINT')) | ||||
|                 ->start(); | ||||
|         } | ||||
|         finally { | ||||
|          | ||||
|             if ($completeService->isSuccessful()) { | ||||
|                 return view('migration.completed'); | ||||
|             } | ||||
| 
 | ||||
|         return view('migration.completed', ['customMessage' => $completeService->getErrors()[0]]); | ||||
|             return view('migration.completed', ['customMessage' => $completeService->getErrors()[0]]); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public function completed() | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user