Passed
Pull Request — main (#465)
by MusikAnimal
03:37 queued 27s
created
src/Controller/TopEditsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
         // Send all to the template.
167 167
         return $this->getFormattedResponse('topedits/result_article', [
168 168
             'xtPage' => 'TopEdits',
169
-            'xtTitle' => $this->user->getUsername() . ' - ' . $this->page->getTitle(),
169
+            'xtTitle' => $this->user->getUsername().' - '.$this->page->getTitle(),
170 170
             'te' => $topEdits,
171 171
         ]);
172 172
     }
Please login to merge, or discard this patch.
src/Controller/ArticleInfoController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@
 block discarded – undo
267 267
         $responseCode = Response::HTTP_OK;
268 268
         $this->recordApiUsage('page/prose');
269 269
         $this->setupArticleInfo($articleInfoRepo, $autoEditsHelper);
270
-        $this->addFlash('info', 'The algorithm used by this API has recently changed. ' .
270
+        $this->addFlash('info', 'The algorithm used by this API has recently changed. '.
271 271
             'See https://www.mediawiki.org/wiki/XTools/Page_History#Prose for details.');
272 272
         $ret = $this->articleInfo->getProseStats();
273 273
         if (null === $ret) {
Please login to merge, or discard this patch.
src/Controller/XtoolsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             throw new XtoolsHttpException(
296 296
                 $this->i18n->msg('not-opted-in', [
297 297
                     $this->getOptedInPage()->getTitle(),
298
-                    $this->i18n->msg('not-opted-in-link') .
298
+                    $this->i18n->msg('not-opted-in-link').
299 299
                         ' <https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/Edit_Counter#restricted_stats>',
300 300
                     $this->i18n->msg('not-opted-in-login'),
301 301
                 ]),
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
             }
571 571
 
572 572
             throw new XtoolsHttpException(
573
-                $this->i18n->msg('too-many-edits', [ $user->maxEdits() ]),
573
+                $this->i18n->msg('too-many-edits', [$user->maxEdits()]),
574 574
                 $this->generateUrl($this->tooHighEditCountRoute(), $this->params),
575 575
                 $originalParams,
576 576
                 $this->isApi,
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
         $params = $this->convertLegacyParams($params);
715 715
 
716 716
         // Remove blank values.
717
-        return array_filter($params, function ($param) {
717
+        return array_filter($params, function($param) {
718 718
             // 'namespace' or 'username' could be '0'.
719 719
             return null !== $param && '' !== $param;
720 720
         });
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
             // Show warnings that the date range was truncated.
773 773
             $this->addFlashMessage('warning', 'date-range-too-wide', [$this->maxDays()]);
774 774
 
775
-            $startTime = strtotime('-' . $this->maxDays() . ' days', $endTime);
775
+            $startTime = strtotime('-'.$this->maxDays().' days', $endTime);
776 776
         }
777 777
 
778 778
         return [$startTime, $endTime];
@@ -944,7 +944,7 @@  discard block
 block discarded – undo
944 944
         }
945 945
 
946 946
         $elapsedTime = round(
947
-            microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'],
947
+            microtime(true)-$_SERVER['REQUEST_TIME_FLOAT'],
948 948
             3
949 949
         );
950 950
         return array_merge($params, ['elapsed_time' => $elapsedTime]);
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
     public function addFullPageTitlesAndContinue(string $key, array $out, array $data): array
975 975
     {
976 976
         // Add full_page_title (in addition to the existing page_title and namespace keys).
977
-        $out[$key] = array_map(function ($rev) {
977
+        $out[$key] = array_map(function($rev) {
978 978
             return array_merge([
979 979
                 'full_page_title' => $this->getPageFromNsAndTitle(
980 980
                     (int)$rev['namespace'],
Please login to merge, or discard this patch.
src/Controller/AdminStatsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
         $actionsRequested = is_array($actionsQuery) ? $actionsQuery : explode('|', $actionsQuery);
144 144
 
145 145
         // Filter out any invalid action names.
146
-        $actions = array_filter($actionsRequested, function ($action) use ($group) {
146
+        $actions = array_filter($actionsRequested, function($action) use ($group) {
147 147
             return in_array($action, $this->getActionNames($group));
148 148
         });
149 149
 
Please login to merge, or discard this patch.
src/Controller/AutomatedEditsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -335,7 +335,7 @@
 block discarded – undo
335 335
             'total_editcount' => $this->autoEdits->getEditCount(),
336 336
             'automated_editcount' => $this->autoEdits->getAutomatedCount(),
337 337
         ];
338
-        $ret['nonautomated_editcount'] = $ret['total_editcount'] - $ret['automated_editcount'];
338
+        $ret['nonautomated_editcount'] = $ret['total_editcount']-$ret['automated_editcount'];
339 339
 
340 340
         if ($this->getBoolVal('tools')) {
341 341
             $tools = $this->autoEdits->getToolCounts();
Please login to merge, or discard this patch.
src/Repository/EditCounterRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Repository;
6 6
 
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
         ])->fetchAllAssociative();
162 162
 
163 163
         $logCounts = array_combine(
164
-            array_map(function ($e) {
164
+            array_map(function($e) {
165 165
                 return $e['source'];
166 166
             }, $results),
167
-            array_map(function ($e) {
167
+            array_map(function($e) {
168 168
                 return (int)$e['value'];
169 169
             }, $results)
170 170
         );
@@ -244,10 +244,10 @@  discard block
 block discarded – undo
244 244
         }
245 245
 
246 246
         $counts = array_combine(
247
-            array_map(function ($e) {
247
+            array_map(function($e) {
248 248
                 return $e['key'];
249 249
             }, $results),
250
-            array_map(function ($e) {
250
+            array_map(function($e) {
251 251
                 return (int)$e['val'];
252 252
             }, $results)
253 253
         );
@@ -429,9 +429,9 @@  discard block
 block discarded – undo
429 429
 
430 430
         $results = $this->executeProjectsQuery($project, $sql, $params)->fetchAll();
431 431
 
432
-        $namespaceTotals = array_combine(array_map(function ($e) {
432
+        $namespaceTotals = array_combine(array_map(function($e) {
433 433
             return $e['namespace'];
434
-        }, $results), array_map(function ($e) {
434
+        }, $results), array_map(function($e) {
435 435
             return (int)$e['total'];
436 436
         }, $results));
437 437
 
Please login to merge, or discard this patch.
src/Model/TopEdits.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Model;
6 6
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     {
164 164
         $firstDateTime = $this->topEdits[0]->getTimestamp();
165 165
         $lastDateTime = end($this->topEdits)->getTimestamp();
166
-        $secs = $firstDateTime->getTimestamp() - $lastDateTime->getTimestamp();
166
+        $secs = $firstDateTime->getTimestamp()-$lastDateTime->getTimestamp();
167 167
         $days = $secs / (60 * 60 * 24);
168 168
         return $days / count($this->topEdits);
169 169
     }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         if ($format) {
266 266
             return $this->formatTopEditsPage($revs);
267 267
         } else {
268
-            return array_map(function ($rev) {
268
+            return array_map(function($rev) {
269 269
                 $rev['minor'] = (bool)$rev['minor'];
270 270
                 $rev['reverted'] = (bool)$rev['reverted'];
271 271
                 return $rev;
Please login to merge, or discard this patch.