Failed Conditions
Pull Request — oauthcreation (#531)
by Simon
18:38 queued 08:37
created
includes/Tasks/PagedInternalPageBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
         $formParameters['limit'] = $this->limit;
103 103
         $this->assign('searchParamsUrl', http_build_query($formParameters, '', '&'));
104 104
 
105
-        foreach ($formParameters as $key => $value)  {
105
+        foreach ($formParameters as $key => $value) {
106 106
             $this->assign($key, $value);
107 107
         }
108 108
     }
Please login to merge, or discard this patch.
includes/DataObjects/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -569,7 +569,7 @@
 block discarded – undo
569 569
     public function getForgottenPasswordHash()
570 570
     {
571 571
         // FIXME
572
-        return md5($this->username . $this->email . $this->welcome_template . $this->id);
572
+        return md5($this->username.$this->email.$this->welcome_template.$this->id);
573 573
     }
574 574
 
575 575
     /**
Please login to merge, or discard this patch.
includes/ConsoleTasks/ClearOAuthDataTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $users = UserSearchHelper::get($database)->inIds(
22 22
             $database->query('SELECT user FROM oauthtoken WHERE type = \'access\'')->fetchColumn());
23 23
 
24
-        foreach ($users as $u){
24
+        foreach ($users as $u) {
25 25
             $oauth = new OAuthUserHelper($u, $database, $this->getOAuthProtocolHelper(), $this->getSiteConfiguration());
26 26
             $oauth->detach();
27 27
         }
Please login to merge, or discard this patch.
includes/ConsoleTasks/RunJobQueueTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                 // Create a task.
74 74
                 $taskName = $job->getTask();
75 75
 
76
-                if(!class_exists($taskName)) {
76
+                if (!class_exists($taskName)) {
77 77
                     throw new ApplicationLogicException('Job task does not exist');
78 78
                 }
79 79
 
@@ -127,6 +127,6 @@  discard block
 block discarded – undo
127 127
     }
128 128
 
129 129
     public static function errorHandler($errno, $errstr, $errfile, $errline) {
130
-        throw new Exception($errfile . "@" . $errline . ": " . $errstr);
130
+        throw new Exception($errfile."@".$errline.": ".$errstr);
131 131
     }
132 132
 }
133 133
\ No newline at end of file
Please login to merge, or discard this patch.
includes/Pages/PageJobQueue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
             throw new ApplicationLogicException('Could not find requested job');
145 145
         }
146 146
 
147
-        $this->setHtmlTitle('Job #' . $job->getId());
147
+        $this->setHtmlTitle('Job #'.$job->getId());
148 148
 
149 149
         $this->prepareMaps();
150 150
 
Please login to merge, or discard this patch.
includes/Pages/PageMain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         $results = $search->getRecordCount($requestCount)->fetch();
113 113
 
114
-        if($requestCount > 0) {
114
+        if ($requestCount > 0) {
115 115
             $requestSectionData['Hospital - Requests failed auto-creation'] = array(
116 116
                 'requests' => $results,
117 117
                 'total'    => $requestCount,
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         $results = $search->getRecordCount($requestCount)->fetch();
145 145
 
146
-        if($requestCount > 0) {
146
+        if ($requestCount > 0) {
147 147
             $requestSectionData['Requests queued in the Job Queue'] = array(
148 148
                 'requests' => $results,
149 149
                 'total'    => $requestCount,
Please login to merge, or discard this patch.
includes/Pages/PageUserManagement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                     continue;
128 128
                 }
129 129
 
130
-                $newValue = WebRequest::postBoolean('role-' . $name) ? 1 : 0;
130
+                $newValue = WebRequest::postBoolean('role-'.$name) ? 1 : 0;
131 131
                 if ($newValue !== $r['active']) {
132 132
                     if ($newValue === 0) {
133 133
                         $delete[] = $r['object'];
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             $user->save();
171 171
 
172 172
             $this->getNotificationHelper()->userRolesEdited($user, $reason);
173
-            SessionAlert::quick('Roles changed for user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
173
+            SessionAlert::quick('Roles changed for user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
174 174
 
175 175
             $this->redirect('statistics/users', 'detail', array('user' => $user->getId()));
176 176
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             Logger::suspendedUser($database, $user, $reason);
224 224
 
225 225
             $this->getNotificationHelper()->userSuspended($user, $reason);
226
-            SessionAlert::quick('Suspended user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
226
+            SessionAlert::quick('Suspended user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
227 227
 
228 228
             // send email
229 229
             $this->sendStatusChangeEmail(
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             Logger::declinedUser($database, $user, $reason);
285 285
 
286 286
             $this->getNotificationHelper()->userDeclined($user, $reason);
287
-            SessionAlert::quick('Declined user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
287
+            SessionAlert::quick('Declined user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
288 288
 
289 289
             // send email
290 290
             $this->sendStatusChangeEmail(
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             Logger::approvedUser($database, $user);
340 340
 
341 341
             $this->getNotificationHelper()->userApproved($user);
342
-            SessionAlert::quick('Approved user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
342
+            SessionAlert::quick('Approved user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
343 343
 
344 344
             // send email
345 345
             $this->sendStatusChangeEmail(
Please login to merge, or discard this patch.
includes/Pages/PageViewRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             }
131 131
         }
132 132
 
133
-        $this->setHtmlTitle($statusSymbol . ' #' . $request->getId());
133
+        $this->setHtmlTitle($statusSymbol.' #'.$request->getId());
134 134
     }
135 135
 
136 136
     /**
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
                 $entryComment = $entry->getComment();
229 229
 
230
-                if($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest'){
230
+                if ($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest') {
231 231
                     $data = unserialize($entry->getComment());
232 232
                     /** @var JobQueue $job */
233 233
                     $job = JobQueue::getById($data['job'], $database);
Please login to merge, or discard this patch.
includes/Pages/UserAuth/PagePreferences.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         // this has the side effect of allowing them to keep a selected mode that either has been changed for them,
82 82
         // or that they have kept from when they previously had certain access.
83 83
         $creationMode = WebRequest::postInt('creationmode');
84
-        if($this->barrierTest($creationMode, $user, 'RequestCreation')){
84
+        if ($this->barrierTest($creationMode, $user, 'RequestCreation')) {
85 85
             $user->setCreationMode($creationMode);
86 86
         }
87 87
     }
Please login to merge, or discard this patch.