Completed
Pull Request — newinternal (#285)
by Simon
07:17 queued 04:17
created
includes/Helpers/OAuthHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function getRequestToken()
78 78
     {
79
-        $endpoint = $this->oauthEndpoint . '/initiate&format=json&oauth_callback=oob';
79
+        $endpoint = $this->oauthEndpoint.'/initiate&format=json&oauth_callback=oob';
80 80
 
81 81
         $parsedUrl = parse_url($endpoint);
82 82
         $urlParameters = array();
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $data = $this->httpHelper->get($targetUrl, null);
92 92
 
93 93
         if ($data === false) {
94
-            throw new Exception('Curl error: ' . $this->httpHelper->getError());
94
+            throw new Exception('Curl error: '.$this->httpHelper->getError());
95 95
         }
96 96
 
97 97
         $token = json_decode($data);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         }
102 102
 
103 103
         if (isset($token->error)) {
104
-            throw new Exception('Error encountered while getting request token: ' . $token->error);
104
+            throw new Exception('Error encountered while getting request token: '.$token->error);
105 105
         }
106 106
 
107 107
         return $token;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function callbackCompleted($oauthRequestToken, $oauthRequestSecret, $oauthVerifier)
130 130
     {
131
-        $endpoint = $this->oauthEndpoint . '/token&format=json';
131
+        $endpoint = $this->oauthEndpoint.'/token&format=json';
132 132
 
133 133
         $requestConsumer = new OAuthConsumer($oauthRequestToken, $oauthRequestSecret);
134 134
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $data = $this->httpHelper->get($targetUrl, null);
147 147
 
148 148
         if ($data === false) {
149
-            throw new Exception('Curl error: ' . $this->httpHelper->getError());
149
+            throw new Exception('Curl error: '.$this->httpHelper->getError());
150 150
         }
151 151
 
152 152
         $token = json_decode($data);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         }
157 157
 
158 158
         if (isset($token->error)) {
159
-            throw new Exception('Error encountered while getting access token: ' . $token->error);
159
+            throw new Exception('Error encountered while getting access token: '.$token->error);
160 160
         }
161 161
 
162 162
         return $token;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function getIdentityTicket($oauthAccessToken, $oauthAccessSecret)
174 174
     {
175
-        $endpoint = $this->oauthEndpoint . '/identify&format=json';
175
+        $endpoint = $this->oauthEndpoint.'/identify&format=json';
176 176
 
177 177
         $oauthToken = new OAuthToken($oauthAccessToken, $oauthAccessSecret);
178 178
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $data = $this->httpHelper->get($targetUrl, null);
190 190
 
191 191
         if ($data === false) {
192
-            throw new Exception('Curl error: ' . $this->httpHelper->getError());
192
+            throw new Exception('Curl error: '.$this->httpHelper->getError());
193 193
         }
194 194
 
195 195
         $decodedData = json_decode($data);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         }
244 244
 
245 245
         if ($data === false) {
246
-            throw new Exception('Curl error: ' . $this->httpHelper->getError());
246
+            throw new Exception('Curl error: '.$this->httpHelper->getError());
247 247
         }
248 248
 
249 249
         return json_decode($data);
Please login to merge, or discard this patch.
includes/Helpers/LogHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             $template = EmailTemplate::getById((int)$id, $entry->getDatabase());
121 121
 
122 122
             if ($template != false) {
123
-                return "closed (" . $template->getName() . ")";
123
+                return "closed (".$template->getName().")";
124 124
             }
125 125
         }
126 126
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
                 /** @var Ban $ban */
238 238
                 $ban = Ban::getById($objectId, $database);
239 239
 
240
-                return 'Ban #' . $objectId . " (" . htmlentities($ban->getTarget()) . ")</a>";
240
+                return 'Ban #'.$objectId." (".htmlentities($ban->getTarget()).")</a>";
241 241
             case 'EmailTemplate':
242 242
                 /** @var EmailTemplate $emailTemplate */
243 243
                 $emailTemplate = EmailTemplate::getById($objectId, $database);
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
                     return "<a href=\"{$baseurl}/internal.php/welcomeTemplates/view?template={$objectId}\">{$userCode}</a>";
277 277
                 }
278 278
             default:
279
-                return '[' . $objectType . " " . $objectId . ']';
279
+                return '['.$objectType." ".$objectId.']';
280 280
         }
281 281
     }
282 282
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
                 $renameData = unserialize($logEntry->getComment());
324 324
                 $oldName = htmlentities($renameData['old'], ENT_COMPAT, 'UTF-8');
325 325
                 $newName = htmlentities($renameData['new'], ENT_COMPAT, 'UTF-8');
326
-                $comment = 'Renamed \'' . $oldName . '\' to \'' . $newName . '\'.';
326
+                $comment = 'Renamed \''.$oldName.'\' to \''.$newName.'\'.';
327 327
             }
328 328
             else {
329 329
                 $comment = $logEntry->getComment();
Please login to merge, or discard this patch.
includes/Helpers/TypeAheadHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $dataList = '';
24 24
         foreach ($generator() as $dataItem) {
25
-            $dataList .= '"' . htmlentities($dataItem) . '", ';
25
+            $dataList .= '"'.htmlentities($dataItem).'", ';
26 26
         }
27
-        $dataList = "[" . rtrim($dataList, ", ") . "]";
27
+        $dataList = "[".rtrim($dataList, ", ")."]";
28 28
 
29 29
         $script = <<<JS
30 30
 $('.{$class}').typeahead({
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         }
47 47
 
48 48
         foreach ($this->definedClasses as $class => $js) {
49
-            $jsBlocks = $js . "\r\n\r\n";
49
+            $jsBlocks = $js."\r\n\r\n";
50 50
         }
51 51
 
52 52
         $data = <<<HTML
Please login to merge, or discard this patch.
includes/Helpers/DebugHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@
 block discarded – undo
51 51
             $output .= "#{$count}: ";
52 52
 
53 53
             if (isset($line['type']) && $line['type'] != "") {
54
-                $output .= $line['class'] . $line['type'];
54
+                $output .= $line['class'].$line['type'];
55 55
             }
56 56
 
57
-            $output .= $line['function'] . "(...)";
57
+            $output .= $line['function']."(...)";
58 58
             $output .= " [{$line['file']}#{$line['line']}\r\n";
59 59
 
60 60
             $count++;
Please login to merge, or discard this patch.
includes/Helpers/EmailHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $headerString = '';
25 25
 
26 26
         foreach ($headers as $header => $headerValue) {
27
-            $headerString .= $header . ': ' . $headerValue . "\r\n";
27
+            $headerString .= $header.': '.$headerValue."\r\n";
28 28
         }
29 29
 
30 30
         mail($to, $subject, $content, $headerString);
Please login to merge, or discard this patch.
includes/DataObjects/Request.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -404,11 +404,11 @@
 block discarded – undo
404 404
     public function getRevealHash()
405 405
     {
406 406
         $data = $this->id         // unique per request
407
-            . '|' . $this->ip           // }
408
-            . '|' . $this->forwardedip  // } private data not known to those without access
409
-            . '|' . $this->useragent    // }
410
-            . '|' . $this->email        // }
411
-            . '|' . $this->status;      // to rudimentarily invalidate the token on status change
407
+            . '|'.$this->ip           // }
408
+            . '|'.$this->forwardedip  // } private data not known to those without access
409
+            . '|'.$this->useragent    // }
410
+            . '|'.$this->email        // }
411
+            . '|'.$this->status; // to rudimentarily invalidate the token on status change
412 412
 
413 413
         return hash('sha256', $data);
414 414
     }
Please login to merge, or discard this patch.
includes/DataObjects/User.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         $userCount = count($userIds);
377 377
 
378 378
         // Firstly, let's create a string of question marks, which will do as positional parameters.
379
-        $inSection = str_repeat('?,', $userCount - 1) . '?';
379
+        $inSection = str_repeat('?,', $userCount - 1).'?';
380 380
 
381 381
         // Now, let's put that into the query. Direct string building here is OK, we're not dealing with user input,
382 382
         // only the *count* of user input, which is safe.
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
             $this->dbObject->prepare("UPDATE user SET oauthidentitycache = NULL WHERE id = :id;")
1092 1092
                 ->execute(array(":id" => $this->id));
1093 1093
 
1094
-            SessionAlert::warning("OAuth error getting identity from MediaWiki: " . $ex->getMessage());
1094
+            SessionAlert::warning("OAuth error getting identity from MediaWiki: ".$ex->getMessage());
1095 1095
         }
1096 1096
     }
1097 1097
 
@@ -1174,7 +1174,7 @@  discard block
 block discarded – undo
1174 1174
      */
1175 1175
     public function getForgottenPasswordHash()
1176 1176
     {
1177
-        return md5($this->username . $this->email . $this->welcome_template . $this->id . $this->password);
1177
+        return md5($this->username.$this->email.$this->welcome_template.$this->id.$this->password);
1178 1178
     }
1179 1179
 
1180 1180
     /**
Please login to merge, or discard this patch.
includes/Fragments/TemplateOutput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     final protected function setUpSmarty()
55 55
     {
56 56
         $this->smarty = new Smarty();
57
-        $this->smarty->addPluginsDir($this->getSiteConfiguration()->getFilePath() . '/smarty-plugins');
57
+        $this->smarty->addPluginsDir($this->getSiteConfiguration()->getFilePath().'/smarty-plugins');
58 58
 
59 59
         $this->assign('currentUser', User::getCommunity());
60 60
         $this->assign('loggedIn', false);
Please login to merge, or discard this patch.
includes/API/Actions/CountAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 
97 97
         $statement = $this->getDatabase()->prepare($query);
98 98
         $statement->bindValue(":username", $this->user->getUsername());
99
-        $statement->bindValue(":date", date('Y-m-d') . "%");
99
+        $statement->bindValue(":date", date('Y-m-d')."%");
100 100
         $statement->execute();
101 101
         $today = $statement->fetchColumn();
102 102
         $statement->closeCursor();
Please login to merge, or discard this patch.