Failed Conditions
Pull Request — oauthcreation (#531)
by Simon
06:20
created
includes/DataObjects/Credential.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     }
113 113
 
114 114
     /**
115
-     * @return mixed
115
+     * @return null|DateTimeImmutable
116 116
      */
117 117
     public function getTimeout()
118 118
     {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     }
125 125
 
126 126
     /**
127
-     * @param mixed $timeout
127
+     * @param null|DateTimeImmutable $timeout
128 128
      */
129 129
     public function setTimeout(DateTimeImmutable $timeout = null)
130 130
     {
Please login to merge, or discard this patch.
includes/Pages/UserAuth/Login/LoginCredentialPageBase.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -281,6 +281,9 @@  discard block
 block discarded – undo
281 281
         $this->redirect("login/" . $this->nextPageMap[$nextStage]);
282 282
     }
283 283
 
284
+    /**
285
+     * @param integer|null $partialStage
286
+     */
284 287
     private function setupAlternates(User $user, $partialStage, PdoDatabase $database)
285 288
     {
286 289
         // get the providers available
@@ -313,7 +316,7 @@  discard block
 block discarded – undo
313 316
 
314 317
     /**
315 318
      * @param $types
316
-     * @param $type
319
+     * @param string $type
317 320
      * @param $userOptions
318 321
      *
319 322
      * @return mixed
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/ICredentialProvider.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -31,6 +31,7 @@
 block discarded – undo
31 31
 
32 32
     /**
33 33
      * @param User $user
34
+     * @return void
34 35
      */
35 36
     public function deleteCredential(User $user);
36 37
 
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/TotpCredentialProvider.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@
 block discarded – undo
61 61
         return $totp->verify($data, null, 2);
62 62
     }
63 63
 
64
+    /**
65
+     * @param null|string $data
66
+     */
64 67
     public function verifyEnable(User $user, $data)
65 68
     {
66 69
         $storedData = $this->getCredentialData($user->getId(), true);
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/YubikeyOtpCredentialProvider.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     }
105 105
 
106 106
     /**
107
-     * @param $result
107
+     * @param string $result
108 108
      *
109 109
      * @return array
110 110
      */
@@ -123,6 +123,9 @@  discard block
 block discarded – undo
123 123
         return $data;
124 124
     }
125 125
 
126
+    /**
127
+     * @param string $data
128
+     */
126 129
     private function getYubikeyId($data)
127 130
     {
128 131
         return substr($data, 0, -32);
@@ -146,7 +149,7 @@  discard block
 block discarded – undo
146 149
     }
147 150
 
148 151
     /**
149
-     * @param $data
152
+     * @param string $data
150 153
      *
151 154
      * @return bool
152 155
      */
Please login to merge, or discard this patch.
includes/WebRequest.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -513,6 +513,10 @@
 block discarded – undo
513 513
         return isset($session['oauthPartialLogin']) ? (int)$session['oauthPartialLogin'] : null;
514 514
     }
515 515
 
516
+    /**
517
+     * @param integer $userId
518
+     * @param integer $stage
519
+     */
516 520
     public static function setAuthPartialLogin($userId, $stage)
517 521
     {
518 522
         $session = &self::$globalStateProvider->getSessionSuperGlobal();
Please login to merge, or discard this patch.
includes/Pages/UserAuth/MultiFactor/PageMultiFactor.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -229,7 +229,8 @@  discard block
 block discarded – undo
229 229
         $this->deleteCredential($database, $currentUser, $otpCredentialProvider, $factorType);
230 230
     }
231 231
 
232
-    protected function enableU2F() {
232
+    protected function enableU2F()
233
+    {
233 234
         $database = $this->getDatabase();
234 235
         $currentUser = User::getCurrent($database);
235 236
 
@@ -336,7 +337,8 @@  discard block
 block discarded – undo
336 337
         }
337 338
     }
338 339
 
339
-    protected function disableU2F() {
340
+    protected function disableU2F()
341
+    {
340 342
         $database = $this->getDatabase();
341 343
         $currentUser = User::getCurrent($database);
342 344
 
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/CredentialProviderBase.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,8 @@  discard block
 block discarded – undo
93 93
         return $this->configuration;
94 94
     }
95 95
 
96
-    public function deleteCredential(User $user) {
96
+    public function deleteCredential(User $user)
97
+    {
97 98
         // get this factor
98 99
         $statement = $this->database->prepare('SELECT * FROM credential WHERE user = :user AND type = :type');
99 100
         $statement->execute(array(':user' => $user->getId(), ':type' => $this->type));
@@ -143,7 +144,8 @@  discard block
 block discarded – undo
143 144
      *
144 145
      * @return bool
145 146
      */
146
-    public function userIsEnrolled($userId) {
147
+    public function userIsEnrolled($userId)
148
+    {
147 149
         $cred = $this->getCredentialData($userId);
148 150
 
149 151
         return $cred !== null;
Please login to merge, or discard this patch.