@@ -129,7 +129,7 @@ |
||
| 129 | 129 | /** |
| 130 | 130 | * Assigns a Smarty variable |
| 131 | 131 | * |
| 132 | - * @param array|string $name the template variable name(s) |
|
| 132 | + * @param string $name the template variable name(s) |
|
| 133 | 133 | * @param mixed $value the value to assign |
| 134 | 134 | */ |
| 135 | 135 | abstract protected function assign($name, $value); |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * Gets the default route if no explicit route is requested. |
| 49 | 49 | * |
| 50 | - * @return callable |
|
| 50 | + * @return string[] |
|
| 51 | 51 | */ |
| 52 | 52 | protected function getDefaultRoute() |
| 53 | 53 | { |
@@ -435,7 +435,7 @@ |
||
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | /** |
| 438 | - * @return callable |
|
| 438 | + * @return string[] |
|
| 439 | 439 | */ |
| 440 | 440 | protected function getDefaultRoute() |
| 441 | 441 | { |
@@ -277,8 +277,9 @@ discard block |
||
| 277 | 277 | * |
| 278 | 278 | * @param string $path The path (relative to the application root) of the file |
| 279 | 279 | */ |
| 280 | - final protected function addCss($path) { |
|
| 281 | - if(in_array($path, $this->extraCss)){ |
|
| 280 | + final protected function addCss($path) |
|
| 281 | + { |
|
| 282 | + if(in_array($path, $this->extraCss)) { |
|
| 282 | 283 | // nothing to do |
| 283 | 284 | return; |
| 284 | 285 | } |
@@ -291,8 +292,9 @@ discard block |
||
| 291 | 292 | * |
| 292 | 293 | * @param string $path The path (relative to the application root) of the file |
| 293 | 294 | */ |
| 294 | - final protected function addJs($path){ |
|
| 295 | - if(in_array($path, $this->extraJs)){ |
|
| 295 | + final protected function addJs($path) |
|
| 296 | + { |
|
| 297 | + if(in_array($path, $this->extraJs)) { |
|
| 296 | 298 | // nothing to do |
| 297 | 299 | return; |
| 298 | 300 | } |
@@ -187,7 +187,8 @@ |
||
| 187 | 187 | $endpoint = $this->siteConfiguration->getMetaWikimediaWebServiceEndpoint(); |
| 188 | 188 | $response = $this->httpHelper->get($endpoint, $parameters); |
| 189 | 189 | $response = json_decode($response, true); |
| 190 | - } catch (CurlException $ex) { |
|
| 190 | + } |
|
| 191 | + catch (CurlException $ex) { |
|
| 191 | 192 | // failed getting identification status, so throw a nicer error. |
| 192 | 193 | $m = 'Could not contact metawiki API to determine user\' identification status. ' |
| 193 | 194 | . 'This is probably a transient error, so please try again.'; |
@@ -24,6 +24,10 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | trait NavigationMenuAccessControl |
| 26 | 26 | { |
| 27 | + /** |
|
| 28 | + * @param string $name |
|
| 29 | + * @param boolean $value |
|
| 30 | + */ |
|
| 27 | 31 | protected abstract function assign($name, $value); |
| 28 | 32 | |
| 29 | 33 | /** |
@@ -32,7 +36,7 @@ discard block |
||
| 32 | 36 | protected abstract function getSecurityManager(); |
| 33 | 37 | |
| 34 | 38 | /** |
| 35 | - * @param $currentUser |
|
| 39 | + * @param \Waca\DataObjects\User $currentUser |
|
| 36 | 40 | */ |
| 37 | 41 | protected function setupNavMenuAccess($currentUser) |
| 38 | 42 | { |
@@ -44,6 +44,9 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | + /** |
|
| 48 | + * @return string |
|
| 49 | + */ |
|
| 47 | 50 | protected abstract function getRegistrationTemplate(); |
| 48 | 51 | |
| 49 | 52 | protected function isProtectedPage() |
@@ -70,12 +73,12 @@ discard block |
||
| 70 | 73 | } |
| 71 | 74 | |
| 72 | 75 | /** |
| 73 | - * @param $emailAddress |
|
| 74 | - * @param $password |
|
| 75 | - * @param $username |
|
| 76 | + * @param null|string $emailAddress |
|
| 77 | + * @param null|string $password |
|
| 78 | + * @param null|string $username |
|
| 76 | 79 | * @param $useOAuthSignup |
| 77 | - * @param $confirmationId |
|
| 78 | - * @param $onwikiUsername |
|
| 80 | + * @param null|integer $confirmationId |
|
| 81 | + * @param null|string $onwikiUsername |
|
| 79 | 82 | * |
| 80 | 83 | * @throws ApplicationLogicException |
| 81 | 84 | */ |
@@ -207,7 +207,8 @@ |
||
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - public function getRoleConfiguration(){ |
|
| 210 | + public function getRoleConfiguration() |
|
| 211 | + { |
|
| 211 | 212 | return $this->roleConfiguration; |
| 212 | 213 | } |
| 213 | 214 | } |
@@ -29,11 +29,11 @@ discard block |
||
| 29 | 29 | foreach ($users as $user) { |
| 30 | 30 | $toAdd = array('user'); |
| 31 | 31 | |
| 32 | - if($user['status'] === 'Admin'){ |
|
| 32 | + if($user['status'] === 'Admin') { |
|
| 33 | 33 | $toAdd[] = 'admin'; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - if($user['checkuser'] == 1){ |
|
| 36 | + if($user['checkuser'] == 1) { |
|
| 37 | 37 | $toAdd[] = 'checkuser'; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $log->setComment($logData); |
| 61 | 61 | $log->save(); |
| 62 | 62 | |
| 63 | - if($user['status'] === 'Admin' || $user['status'] === 'User'){ |
|
| 63 | + if($user['status'] === 'Admin' || $user['status'] === 'User') { |
|
| 64 | 64 | $update->execute(array('id' => $user['id'])); |
| 65 | 65 | } |
| 66 | 66 | } |