Code Duplication    Length = 8-9 lines in 2 locations

lib/Controller/OtoConfirmationController.php 1 location

@@ 75-83 (lines=9) @@
72
	 }
73
	 //returns a data response that contains all of the confirmations for a user 
74
	 //along with their otoLayer's sourceId and destinationId
75
	 public function getConfirmationsByUser(){
76
		//user ID is passed in
77
		$userId = $this->userSession->getUser()->getUID();
78
		try{
79
			return new DataResponse($this->mapper->getConfirmationsByUser($userId));
80
		}catch(Exception $e){
81
			return new DataResponse([],Http::STATUS_NOT_FOUND);
82
		}
83
	 }
84
	 //deletes a layer and all of it's confirmations
85
	 public function deleteConfirmationsLayers($otoLayerId){
86
		try{

lib/Controller/OtoLayerController.php 1 location

@@ 88-95 (lines=8) @@
85
		}
86
	}
87
	
88
	public function findUserLayers(){
89
		$userId = $this->userSession->getUser()->getUID();
90
		try{
91
			return new DataResponse($this->mapper->findUserLayers($userId));
92
		}catch(Exception $e){
93
			return new DataResponse([], Http::STATUS_NOT_FOUND);
94
		}
95
	}
96
 }