@@ -52,8 +52,7 @@ |
||
| 52 | 52 | SessionAlert::success('Password changed successfully!'); |
| 53 | 53 | |
| 54 | 54 | $this->redirect('preferences'); |
| 55 | - } |
|
| 56 | - else { |
|
| 55 | + } else { |
|
| 57 | 56 | $this->assignCSRFToken(); |
| 58 | 57 | $this->setTemplate('preferences/changePassword.tpl'); |
| 59 | 58 | $this->addJs("/vendor/dropbox/zxcvbn/dist/zxcvbn.js"); |
@@ -46,8 +46,7 @@ discard block |
||
| 46 | 46 | SessionAlert::success('<strong>Your password reset request has been completed.</strong> If the details you have provided match our records, you should receive an email shortly.'); |
| 47 | 47 | |
| 48 | 48 | $this->redirect('login'); |
| 49 | - } |
|
| 50 | - else { |
|
| 49 | + } else { |
|
| 51 | 50 | $this->assignCSRFToken(); |
| 52 | 51 | $this->setTemplate('forgot-password/forgotpw.tpl'); |
| 53 | 52 | } |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | |
| 131 | 130 | return; |
| 132 | 131 | } |
| 133 | - } |
|
| 134 | - else { |
|
| 132 | + } else { |
|
| 135 | 133 | $this->assignCSRFToken(); |
| 136 | 134 | $this->assign('user', $user); |
| 137 | 135 | $this->setTemplate('forgot-password/forgotpwreset.tpl'); |
@@ -38,7 +38,8 @@ |
||
| 38 | 38 | $requestList->requests = $requests; |
| 39 | 39 | |
| 40 | 40 | $userIds = array_map( |
| 41 | - function(Request $entry) { |
|
| 41 | + function(Request $entry) |
|
| 42 | + { |
|
| 42 | 43 | return $entry->getReserved(); |
| 43 | 44 | }, |
| 44 | 45 | $requests |
@@ -260,8 +260,7 @@ |
||
| 260 | 260 | |
| 261 | 261 | $comment->setComment("This request would have been deferred automatically due to a matching rule, but the queue to defer to could not be found."); |
| 262 | 262 | $comment->save(); |
| 263 | - } |
|
| 264 | - else { |
|
| 263 | + } else { |
|
| 265 | 264 | $this->deferRequest($request, $targetQueue, 'Request deferred automatically due to matching rule.'); |
| 266 | 265 | } |
| 267 | 266 | } |
@@ -166,8 +166,7 @@ discard block |
||
| 166 | 166 | SessionAlert::success("Template successfully created."); |
| 167 | 167 | |
| 168 | 168 | $this->redirect('welcomeTemplates'); |
| 169 | - } |
|
| 170 | - else { |
|
| 169 | + } else { |
|
| 171 | 170 | $this->assignCSRFToken(); |
| 172 | 171 | $this->assign('template', new WelcomeTemplate()); |
| 173 | 172 | $this->setTemplate("welcome-template/edit.tpl"); |
@@ -216,8 +215,7 @@ discard block |
||
| 216 | 215 | $this->getNotificationHelper()->welcomeTemplateEdited($template); |
| 217 | 216 | |
| 218 | 217 | $this->redirect('welcomeTemplates'); |
| 219 | - } |
|
| 220 | - else { |
|
| 218 | + } else { |
|
| 221 | 219 | $this->assignCSRFToken(); |
| 222 | 220 | $this->assign('template', $template); |
| 223 | 221 | $this->setTemplate('welcome-template/edit.tpl'); |
@@ -30,11 +30,13 @@ |
||
| 30 | 30 | $files = scandir($errorLogDirectory); |
| 31 | 31 | |
| 32 | 32 | // Exclude the files we know should be there |
| 33 | - $filteredFiles = array_filter($files, function($file) { |
|
| 33 | + $filteredFiles = array_filter($files, function($file) |
|
| 34 | + { |
|
| 34 | 35 | return !in_array($file, ['.', '..', 'README.md']); |
| 35 | 36 | }); |
| 36 | 37 | |
| 37 | - $exceptionDetails = array_map(function($item) use ($errorLogDirectory) { |
|
| 38 | + $exceptionDetails = array_map(function($item) use ($errorLogDirectory) |
|
| 39 | + { |
|
| 38 | 40 | $filename = realpath($errorLogDirectory) . DIRECTORY_SEPARATOR . $item; |
| 39 | 41 | |
| 40 | 42 | return [ |
@@ -187,7 +187,8 @@ |
||
| 187 | 187 | |
| 188 | 188 | // FIXME: domains! |
| 189 | 189 | $requestQueues = RequestQueue::getAllQueues($database); |
| 190 | - $queuesById = array_reduce($requestQueues, function($result, RequestQueue $item) { |
|
| 190 | + $queuesById = array_reduce($requestQueues, function($result, RequestQueue $item) |
|
| 191 | + { |
|
| 191 | 192 | $result[$item->getId()] = $item; |
| 192 | 193 | return $result; |
| 193 | 194 | }, array()); |
@@ -136,8 +136,7 @@ discard block |
||
| 136 | 136 | $this->setTemplate('view-request/main-with-checkuser-data.tpl'); |
| 137 | 137 | $this->setupCheckUserData($request); |
| 138 | 138 | } |
| 139 | - } |
|
| 140 | - else { |
|
| 139 | + } else { |
|
| 141 | 140 | $this->setTemplate('view-request/main.tpl'); |
| 142 | 141 | } |
| 143 | 142 | } |
@@ -151,8 +150,7 @@ discard block |
||
| 151 | 150 | if ($request->getStatus() === RequestStatus::CLOSED) { |
| 152 | 151 | if ($request->getWasCreated()) { |
| 153 | 152 | $statusSymbol = self::STATUS_SYMBOL_ACCEPTED; |
| 154 | - } |
|
| 155 | - else { |
|
| 153 | + } else { |
|
| 156 | 154 | $statusSymbol = self::STATUS_SYMBOL_REJECTED; |
| 157 | 155 | } |
| 158 | 156 | } |
@@ -304,8 +302,7 @@ discard block |
||
| 304 | 302 | 'jobId' => $job->getId(), |
| 305 | 303 | 'jobDesc' => JobQueue::getTaskDescriptions()[$job->getTask()], |
| 306 | 304 | ); |
| 307 | - } |
|
| 308 | - else { |
|
| 305 | + } else { |
|
| 309 | 306 | $requestLogs[] = array( |
| 310 | 307 | 'type' => 'log', |
| 311 | 308 | 'security' => 'user', |
@@ -70,15 +70,13 @@ |
||
| 70 | 70 | |
| 71 | 71 | if ($flagState === 1) { |
| 72 | 72 | Logger::flaggedComment($database, $comment, $request->getDomain()); |
| 73 | - } |
|
| 74 | - else { |
|
| 73 | + } else { |
|
| 75 | 74 | Logger::unflaggedComment($database, $comment, $request->getDomain()); |
| 76 | 75 | } |
| 77 | 76 | |
| 78 | 77 | if (WebRequest::postString('return') == 'list') { |
| 79 | 78 | $this->redirect('flaggedComments'); |
| 80 | - } |
|
| 81 | - else { |
|
| 79 | + } else { |
|
| 82 | 80 | $this->redirect('viewRequest', null, ['id' => $comment->getRequest()]); |
| 83 | 81 | } |
| 84 | 82 | } |