@@ -233,6 +233,9 @@ |
||
233 | 233 | Logger::backgroundJobComplete($this->getDatabase(), $this->getJob()); |
234 | 234 | } |
235 | 235 | |
236 | + /** |
|
237 | + * @param string $reason |
|
238 | + */ |
|
236 | 239 | protected function markCancelled($reason = null) |
237 | 240 | { |
238 | 241 | $this->job->setStatus(JobQueue::STATUS_CANCELLED); |
@@ -105,6 +105,9 @@ discard block |
||
105 | 105 | return $this->getMediaWikiHelper()->checkAccountExists($name); |
106 | 106 | } |
107 | 107 | |
108 | + /** |
|
109 | + * @param string $reason |
|
110 | + */ |
|
108 | 111 | protected function markFailed($reason = null) |
109 | 112 | { |
110 | 113 | $this->request->setStatus(RequestStatus::HOSPITAL); |
@@ -116,7 +119,7 @@ discard block |
||
116 | 119 | } |
117 | 120 | |
118 | 121 | /** |
119 | - * @param $user |
|
122 | + * @param User $user |
|
120 | 123 | * |
121 | 124 | * @throws ApplicationLogicException |
122 | 125 | */ |
@@ -225,7 +225,7 @@ |
||
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
228 | - * @return mixed |
|
228 | + * @return string |
|
229 | 229 | */ |
230 | 230 | public function getError() |
231 | 231 | { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | #region properties |
84 | 84 | |
85 | 85 | /** |
86 | - * @return mixed |
|
86 | + * @return integer |
|
87 | 87 | */ |
88 | 88 | public function getUserId() |
89 | 89 | { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
102 | - * @return mixed |
|
102 | + * @return string |
|
103 | 103 | */ |
104 | 104 | public function getToken() |
105 | 105 | { |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
118 | - * @return mixed |
|
118 | + * @return string |
|
119 | 119 | */ |
120 | 120 | public function getSecret() |
121 | 121 | { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
134 | - * @return mixed |
|
134 | + * @return string |
|
135 | 135 | */ |
136 | 136 | public function getType() |
137 | 137 | { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
142 | - * @param mixed $type |
|
142 | + * @param string $type |
|
143 | 143 | */ |
144 | 144 | public function setType($type) |
145 | 145 | { |
@@ -83,7 +83,7 @@ |
||
83 | 83 | |
84 | 84 | /** |
85 | 85 | * @param $apiParams |
86 | - * @param $method |
|
86 | + * @param string $method |
|
87 | 87 | * |
88 | 88 | * @return mixed |
89 | 89 | * @throws ApplicationLogicException |
@@ -10,5 +10,8 @@ |
||
10 | 10 | |
11 | 11 | interface IMediaWikiClient |
12 | 12 | { |
13 | + /** |
|
14 | + * @param string $method |
|
15 | + */ |
|
13 | 16 | function doApiCall($params, $method); |
14 | 17 | } |
15 | 18 | \ No newline at end of file |
@@ -63,6 +63,10 @@ discard block |
||
63 | 63 | private $siteConfiguration; |
64 | 64 | |
65 | 65 | #region Static methods |
66 | + |
|
67 | + /** |
|
68 | + * @param null|string $requestToken |
|
69 | + */ |
|
66 | 70 | public static function findUserByRequestToken($requestToken, PdoDatabase $database) |
67 | 71 | { |
68 | 72 | $statement = $database->prepare(<<<'SQL' |
@@ -119,6 +123,11 @@ discard block |
||
119 | 123 | } |
120 | 124 | } |
121 | 125 | |
126 | + /** |
|
127 | + * @param integer $userId |
|
128 | + * @param null|PdoDatabase $database |
|
129 | + * @param string $tokenType |
|
130 | + */ |
|
122 | 131 | private static function runTokenCount($userId, $database, $tokenType) |
123 | 132 | { |
124 | 133 | if (self::$tokenCountStatement === null) { |
@@ -182,7 +191,7 @@ discard block |
||
182 | 191 | /** |
183 | 192 | * Attempts to figure out if a user is partially linked to OAuth, and therefore needs to complete the OAuth |
184 | 193 | * procedure before configuring. |
185 | - * @return bool |
|
194 | + * @return boolean|null |
|
186 | 195 | */ |
187 | 196 | public function isPartiallyLinked() |
188 | 197 | { |
@@ -245,6 +254,9 @@ discard block |
||
245 | 254 | return $this->oauthProtocolHelper->getAuthoriseUrl($token->key); |
246 | 255 | } |
247 | 256 | |
257 | + /** |
|
258 | + * @param null|string $verificationToken |
|
259 | + */ |
|
248 | 260 | public function completeHandshake($verificationToken) |
249 | 261 | { |
250 | 262 | $this->getTokenStatement->execute(array(':user' => $this->user->getId(), ':type' => self::TOKEN_REQUEST)); |
@@ -112,7 +112,7 @@ discard block |
||
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 |
||
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 | { |
@@ -281,6 +281,9 @@ discard block |
||
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 |
||
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 |