Completed
Pull Request — newinternal (#285)
by Simon
07:17 queued 04:17
created
includes/Helpers/SearchHelpers/SearchHelperBase.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @param string $column The required column
78 78
      * @return array
79 79
      */
80
-    public function fetchColumn($column){
80
+    public function fetchColumn($column) {
81 81
         $statement = $this->getData($column);
82 82
 
83 83
         return $statement->fetchAll(PDO::FETCH_COLUMN);
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function getRecordCount(&$count)
92 92
     {
93
-        $query = 'SELECT /* SearchHelper */ COUNT(*) FROM ' . $this->table . ' origin ';
94
-        $query .= $this->joinClause . $this->whereClause;
93
+        $query = 'SELECT /* SearchHelper */ COUNT(*) FROM '.$this->table.' origin ';
94
+        $query .= $this->joinClause.$this->whereClause;
95 95
 
96 96
         $statement = $this->database->prepare($query);
97 97
         $statement->execute($this->parameterList);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     private function applyOrder()
139 139
     {
140 140
         if ($this->orderBy !== null) {
141
-            return ' ORDER BY ' . $this->orderBy;
141
+            return ' ORDER BY '.$this->orderBy;
142 142
         }
143 143
 
144 144
         return '';
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
      */
169 169
     protected function buildQuery($column)
170 170
     {
171
-        $query = 'SELECT /* SearchHelper */ origin.' . $column . ' FROM ' . $this->table . ' origin ';
172
-        $query .= $this->joinClause . $this->whereClause;
171
+        $query = 'SELECT /* SearchHelper */ origin.'.$column.' FROM '.$this->table.' origin ';
172
+        $query .= $this->joinClause.$this->whereClause;
173 173
 
174 174
         return $query;
175 175
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $valueCount = count($values);
189 189
 
190 190
         // Firstly, let's create a string of question marks, which will do as positional parameters.
191
-        $inSection = str_repeat('?,', $valueCount - 1) . '?';
191
+        $inSection = str_repeat('?,', $valueCount - 1).'?';
192 192
 
193 193
         $this->whereClause .= " AND {$column} IN ({$inSection})";
194 194
         $this->parameterList = array_merge($this->parameterList, $values);
Please login to merge, or discard this patch.
includes/Tasks/PageBase.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             $targetScriptName = $currentScriptName;
220 220
         }
221 221
         else {
222
-            $targetScriptName = $this->getSiteConfiguration()->getBaseUrl() . '/' . $script;
222
+            $targetScriptName = $this->getSiteConfiguration()->getBaseUrl().'/'.$script;
223 223
         }
224 224
 
225 225
         $pathInfo = array($targetScriptName);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $url = implode('/', $pathInfo);
234 234
 
235 235
         if (is_array($parameters) && count($parameters) > 0) {
236
-            $url .= '?' . http_build_query($parameters);
236
+            $url .= '?'.http_build_query($parameters);
237 237
         }
238 238
 
239 239
         $this->redirectUrl($url);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      * @param string $path The path (relative to the application root) of the file
279 279
      */
280 280
     final protected function addCss($path) {
281
-        if(in_array($path, $this->extraCss)){
281
+        if (in_array($path, $this->extraCss)) {
282 282
             // nothing to do
283 283
             return;
284 284
         }
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
      *
292 292
      * @param string $path The path (relative to the application root) of the file
293 293
      */
294
-    final protected function addJs($path){
295
-        if(in_array($path, $this->extraJs)){
294
+    final protected function addJs($path) {
295
+        if (in_array($path, $this->extraJs)) {
296 296
             // nothing to do
297 297
             return;
298 298
         }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     protected function sendResponseHeaders()
346 346
     {
347 347
         if (headers_sent()) {
348
-            throw new ApplicationLogicException          ('Headers have already been sent! This is likely a bug in the application.');
348
+            throw new ApplicationLogicException('Headers have already been sent! This is likely a bug in the application.');
349 349
         }
350 350
 
351 351
         foreach ($this->headerQueue as $item) {
Please login to merge, or discard this patch.
includes/IdentificationVerifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $onWikiName = $strings->ucfirst($onWikiName);
182 182
 
183 183
         $parameters = self::$apiQueryParameters;
184
-        $parameters['pltitles'] = "User:" . $onWikiName;
184
+        $parameters['pltitles'] = "User:".$onWikiName;
185 185
 
186 186
         try {
187 187
             $endpoint = $this->siteConfiguration->getMetaWikimediaWebServiceEndpoint();
@@ -197,6 +197,6 @@  discard block
 block discarded – undo
197 197
 
198 198
         $page = @array_pop($response['query']['pages']);
199 199
 
200
-        return @$page['links'][0]['title'] === "User:" . $onWikiName;
200
+        return @$page['links'][0]['title'] === "User:".$onWikiName;
201 201
     }
202 202
 }
Please login to merge, or discard this patch.