Passed
Push — swagger-docs ( 6837d7 )
by MusikAnimal
11:33
created
src/Model/Pages.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
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         }
128 128
 
129 129
         $numResults = count($this->getResults()[$this->getNamespace()]);
130
-        $timestamp = new DateTime($this->getResults()[$this->getNamespace()][$numResults - 1]['rev_timestamp']);
130
+        $timestamp = new DateTime($this->getResults()[$this->getNamespace()][$numResults-1]['rev_timestamp']);
131 131
         return $timestamp->format('Y-m-d\TH:i:s');
132 132
     }
133 133
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             $counts[$ns] = [
248 248
                 'count' => $count,
249 249
                 'total_length' => $totalLength,
250
-                'avg_length' => round($count > 0 ?$totalLength / $count : 0, 1),
250
+                'avg_length' => round($count > 0 ? $totalLength / $count : 0, 1),
251 251
             ];
252 252
             if ('live' !== $this->deleted) {
253 253
                 $counts[$ns]['deleted'] = (int)$row['deleted'];
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.