@@ -64,12 +64,10 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | if ($user === false) { |
| 66 | 66 | self::$currentUser = new CommunityUser(); |
| 67 | - } |
|
| 68 | - else { |
|
| 67 | + } else { |
|
| 69 | 68 | self::$currentUser = $user; |
| 70 | 69 | } |
| 71 | - } |
|
| 72 | - else { |
|
| 70 | + } else { |
|
| 73 | 71 | $anonymousCoward = new CommunityUser(); |
| 74 | 72 | |
| 75 | 73 | self::$currentUser = $anonymousCoward; |
@@ -203,12 +201,10 @@ discard block |
||
| 203 | 201 | |
| 204 | 202 | if ($statement->execute()) { |
| 205 | 203 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 206 | - } |
|
| 207 | - else { |
|
| 204 | + } else { |
|
| 208 | 205 | throw new Exception($statement->errorInfo()); |
| 209 | 206 | } |
| 210 | - } |
|
| 211 | - else { |
|
| 207 | + } else { |
|
| 212 | 208 | // update |
| 213 | 209 | $statement = $this->dbObject->prepare(<<<SQL |
| 214 | 210 | UPDATE `user` SET |
@@ -533,12 +529,10 @@ discard block |
||
| 533 | 529 | if ($this->forceidentified === 0 || $this->forceidentified === "0") { |
| 534 | 530 | // User forced to unidentified in the database. |
| 535 | 531 | return false; |
| 536 | - } |
|
| 537 | - elseif ($this->forceidentified === 1 || $this->forceidentified === "1") { |
|
| 532 | + } elseif ($this->forceidentified === 1 || $this->forceidentified === "1") { |
|
| 538 | 533 | // User forced to identified in the database. |
| 539 | 534 | return true; |
| 540 | - } |
|
| 541 | - else { |
|
| 535 | + } else { |
|
| 542 | 536 | // User not forced to any particular identified status; consult IdentificationVerifier |
| 543 | 537 | return $iv->isUserIdentified($this->getOnWikiName()); |
| 544 | 538 | } |
@@ -549,7 +543,8 @@ discard block |
||
| 549 | 543 | * |
| 550 | 544 | * @return bool|null |
| 551 | 545 | */ |
| 552 | - public function getForceIdentified() { |
|
| 546 | + public function getForceIdentified() |
|
| 547 | + { |
|
| 553 | 548 | return $this->forceidentified; |
| 554 | 549 | } |
| 555 | 550 | |
@@ -46,8 +46,7 @@ |
||
| 46 | 46 | SessionAlert::success("Preferences updated!"); |
| 47 | 47 | |
| 48 | 48 | $this->redirect(''); |
| 49 | - } |
|
| 50 | - else { |
|
| 49 | + } else { |
|
| 51 | 50 | $this->assignCSRFToken(); |
| 52 | 51 | $this->setTemplate('preferences/prefs.tpl'); |
| 53 | 52 | $this->assign("enforceOAuth", $enforceOAuth); |
@@ -99,8 +99,7 @@ discard block |
||
| 99 | 99 | $this->setTemplate('view-request/main-with-checkuser-data.tpl'); |
| 100 | 100 | $this->setupCheckUserData($request); |
| 101 | 101 | } |
| 102 | - } |
|
| 103 | - else { |
|
| 102 | + } else { |
|
| 104 | 103 | $this->setTemplate('view-request/main.tpl'); |
| 105 | 104 | } |
| 106 | 105 | } |
@@ -114,8 +113,7 @@ discard block |
||
| 114 | 113 | if ($request->getStatus() === 'Closed') { |
| 115 | 114 | if ($request->getWasCreated()) { |
| 116 | 115 | $statusSymbol = self::STATUS_SYMBOL_ACCEPTED; |
| 117 | - } |
|
| 118 | - else { |
|
| 116 | + } else { |
|
| 119 | 117 | $statusSymbol = self::STATUS_SYMBOL_REJECTED; |
| 120 | 118 | } |
| 121 | 119 | } |