Passed
Push — oauthcreation-fixes ( 300b79...7bb32b )
by Simon
05:11 queued 02:25
created
includes/Pages/PageUserManagement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $userSearchRequest = WebRequest::getString('usersearch');
41 41
         if ($userSearchRequest !== null) {
42 42
             $searchedUser = User::getByUsername($userSearchRequest, $database);
43
-            if($searchedUser !== false) {
43
+            if ($searchedUser !== false) {
44 44
                 $this->redirect('statistics/users', 'detail', ['user' => $searchedUser->getId()]);
45 45
                 return;
46 46
             }
Please login to merge, or discard this patch.
includes/Pages/UserAuth/Login/PagePasswordLogin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         list($partialId, $partialStage) = WebRequest::getAuthPartialLogin();
19 19
 
20
-        if($partialId !== null && $partialStage > 1) {
20
+        if ($partialId !== null && $partialStage > 1) {
21 21
             $sql = 'SELECT type FROM credential WHERE user = :user AND factor = :stage AND disabled = 0 ORDER BY priority';
22 22
             $statement = $this->getDatabase()->prepare($sql);
23 23
             $statement->execute(array(':user' => $partialId, ':stage' => $partialStage));
Please login to merge, or discard this patch.
includes/Helpers/OAuthProtocolHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
         $apiParams['format'] = 'json';
92 92
 
93
-        if ($apiParams === null || ! is_array($apiParams)) {
93
+        if ($apiParams === null || !is_array($apiParams)) {
94 94
             throw new CurlException("Invalid API call");
95 95
         }
96 96
 
Please login to merge, or discard this patch.
includes/Helpers/HttpHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYPEER, false);
34 34
         }
35 35
 
36
-        if($cookieJar !== null) {
36
+        if ($cookieJar !== null) {
37 37
             curl_setopt($this->curlHandle, CURLOPT_COOKIEFILE, $cookieJar);
38 38
             curl_setopt($this->curlHandle, CURLOPT_COOKIEJAR, $cookieJar);
39 39
         }
Please login to merge, or discard this patch.
includes/Helpers/SearchHelpers/RequestSearchHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     public function isHospitalised()
168 168
     {
169 169
         $this->whereClause .= ' AND status = ?';
170
-        $this->parameterList[] =  RequestStatus::HOSPITAL;
170
+        $this->parameterList[] = RequestStatus::HOSPITAL;
171 171
 
172 172
         return $this;
173 173
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function notHospitalised()
181 181
     {
182 182
         $this->whereClause .= ' AND status <> ?';
183
-        $this->parameterList[] =  RequestStatus::HOSPITAL;
183
+        $this->parameterList[] = RequestStatus::HOSPITAL;
184 184
 
185 185
         return $this;
186 186
     }
Please login to merge, or discard this patch.
includes/Pages/PageViewRequest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,8 @@
 block discarded – undo
214 214
                         'jobId'    => $job->getId(),
215 215
                         'jobDesc'  => JobQueue::getTaskDescriptions()[$job->getTask()],
216 216
                     );
217
-                } else {
217
+                }
218
+                else {
218 219
                     $requestLogs[] = array(
219 220
                         'type'     => 'log',
220 221
                         'security' => 'user',
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
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
             $this->getSiteConfiguration());
91 91
 
92 92
         // token is for old consumer, run through the approval workflow again
93
-        if($oauth->getIdentity(true)->getAudience() !== $this->getSiteConfiguration()->getOAuthConsumerToken()) {
93
+        if ($oauth->getIdentity(true)->getAudience() !== $this->getSiteConfiguration()->getOAuthConsumerToken()) {
94 94
             $authoriseUrl = $oauth->getRequestToken();
95 95
             $this->redirectUrl($authoriseUrl);
96 96
 
Please login to merge, or discard this patch.
includes/Pages/PageWelcomeTemplateManagement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
         // <https://accounts.wmflabs.org/wiki/Help:Introduction>
108 108
         // The code currently assumes that the template was parsed for enwiki, and will need to be
109 109
         // updated once other wikis are supported.
110
-        $templateHtml = preg_replace( '/(<a href=")(\/wiki\/)/', '$1//en.wikipedia.org$2', $templateHtml );
110
+        $templateHtml = preg_replace('/(<a href=")(\/wiki\/)/', '$1//en.wikipedia.org$2', $templateHtml);
111 111
 
112 112
         $this->assign('templateHtml', $templateHtml);
113 113
         $this->assign('template', $template);
Please login to merge, or discard this patch.
includes/API/Actions/CountAction.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -115,14 +115,14 @@
 block discarded – undo
115 115
         // Each entry is in the form [ database string, attribute name ]
116 116
         // and it happens to be that the attribute is just the lower case form of the database value
117 117
         $actions = [
118
-            [ 'Suspended', 'suspended' ],
119
-            [ 'Promoted', 'promoted' ],
120
-            [ 'Approved', 'approved' ],
121
-            [ 'Demoted', 'demoted' ],
122
-            [ 'Declined', 'declined' ],
123
-            [ 'Renamed', 'renamed' ],
124
-            [ 'Edited', 'edited' ],
125
-            [ 'Prefchange', 'prefchange' ],
118
+            ['Suspended', 'suspended'],
119
+            ['Promoted', 'promoted'],
120
+            ['Approved', 'approved'],
121
+            ['Demoted', 'demoted'],
122
+            ['Declined', 'declined'],
123
+            ['Renamed', 'renamed'],
124
+            ['Edited', 'edited'],
125
+            ['Prefchange', 'prefchange'],
126 126
         ];
127 127
         foreach ($actions as $action) {
128 128
             $dbValue = $action[0];
Please login to merge, or discard this patch.