Completed
Pull Request — master (#4479)
by Jan-Christoph
13:38
created
core/Controller/ClientFlowLoginController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	private function isValidToken($stateToken) {
101 101
 		$currentToken = $this->session->get(self::stateName);
102
-		if(!is_string($stateToken) || !is_string($currentToken)) {
102
+		if (!is_string($stateToken) || !is_string($currentToken)) {
103 103
 			return false;
104 104
 		}
105 105
 		return hash_equals($currentToken, $stateToken);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @return TemplateResponse
130 130
 	 */
131 131
 	public function showAuthPickerPage() {
132
-		if($this->userSession->isLoggedIn()) {
132
+		if ($this->userSession->isLoggedIn()) {
133 133
 			return new TemplateResponse(
134 134
 				$this->appName,
135 135
 				'403',
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	 * @return TemplateResponse
170 170
 	 */
171 171
 	public function redirectPage($stateToken = '') {
172
-		if(!$this->isValidToken($stateToken)) {
172
+		if (!$this->isValidToken($stateToken)) {
173 173
 			return $this->stateTokenForbiddenResponse();
174 174
 		}
175 175
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 * @return Http\RedirectResponse|Response
193 193
 	 */
194 194
 	public function generateAppPassword($stateToken) {
195
-		if(!$this->isValidToken($stateToken)) {
195
+		if (!$this->isValidToken($stateToken)) {
196 196
 			$this->session->remove(self::stateName);
197 197
 			return $this->stateTokenForbiddenResponse();
198 198
 		}
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 			IToken::DO_NOT_REMEMBER
233 233
 		);
234 234
 
235
-		return new Http\RedirectResponse('nc://' . urlencode($loginName) . ':' . urlencode($token) . '@' . $this->request->getServerHost());
235
+		return new Http\RedirectResponse('nc://'.urlencode($loginName).':'.urlencode($token).'@'.$this->request->getServerHost());
236 236
 	}
237 237
 
238 238
 }
Please login to merge, or discard this patch.