Passed
Push — symfony-upgrade ( d3a256...8f42b6 )
by MusikAnimal
04:15
created
src/Twig/TopNavExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace App\Twig;
5 5
 
Please login to merge, or discard this patch.
src/Twig/AppExtension.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the AppExtension class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace App\Twig;
9 9
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     public function requestTime(): float
122 122
     {
123 123
         if (!isset($this->requestTime)) {
124
-            $this->requestTime = microtime(true) - $this->getRequest()->server->get('REQUEST_TIME_FLOAT');
124
+            $this->requestTime = microtime(true)-$this->getRequest()->server->get('REQUEST_TIME_FLOAT');
125 125
         }
126 126
 
127 127
         return $this->requestTime;
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
         }
550 550
 
551 551
         $sizeMessage = $this->numberFormat(
552
-            pow(1024, $base - floor($base)),
552
+            pow(1024, $base-floor($base)),
553 553
             $precision
554 554
         );
555 555
 
@@ -706,15 +706,15 @@  discard block
 block discarded – undo
706 706
 
707 707
         if ($seconds >= 86400) {
708 708
             // Over a day
709
-            $val = (int) floor($seconds / 86400);
709
+            $val = (int)floor($seconds / 86400);
710 710
             $key = 'days';
711 711
         } elseif ($seconds >= 3600) {
712 712
             // Over an hour, less than a day
713
-            $val = (int) floor($seconds / 3600);
713
+            $val = (int)floor($seconds / 3600);
714 714
             $key = 'hours';
715 715
         } elseif ($seconds >= 60) {
716 716
             // Over a minute, less than an hour
717
-            $val = (int) floor($seconds / 60);
717
+            $val = (int)floor($seconds / 60);
718 718
             $key = 'minutes';
719 719
         }
720 720
 
Please login to merge, or discard this patch.
src/Kernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App;
6 6
 
Please login to merge, or discard this patch.
src/Exception/XtoolsHttpException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 /**
5 5
  * This file contains only the XtoolsHttpException class.
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
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
         $actions = is_array($actionsQuery) ? $actionsQuery : explode('|', $actionsQuery);
119 119
 
120 120
         // Filter out any invalid section IDs.
121
-        $actions = array_filter($actions, function ($action) use ($group) {
121
+        $actions = array_filter($actions, function($action) use ($group) {
122 122
             return in_array($action, $this->getActionNames($group));
123 123
         });
124 124
 
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
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             throw new XtoolsHttpException(
218 218
                 $this->i18n->msg('not-opted-in', [
219 219
                     $this->getOptedInPage()->getTitle(),
220
-                    $this->i18n->msg('not-opted-in-link') .
220
+                    $this->i18n->msg('not-opted-in-link').
221 221
                         ' <https://www.mediawiki.org/wiki/XTools/Edit_Counter#restricted_stats>',
222 222
                     $this->i18n->msg('not-opted-in-login'),
223 223
                 ]),
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      * Set cookies on the given Response.
264 264
      * @param Response $response
265 265
      */
266
-    private function setCookies(Response &$response): void
266
+    private function setCookies(Response & $response): void
267 267
     {
268 268
         // Not done for subrequests.
269 269
         if ($this->isSubRequest) {
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
         $params = $this->convertLegacyParams($params);
664 664
 
665 665
         // Remove blank values.
666
-        return array_filter($params, function ($param) {
666
+        return array_filter($params, function($param) {
667 667
             // 'namespace' or 'username' could be '0'.
668 668
             return null !== $param && '' !== $param;
669 669
         });
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
         }
865 865
 
866 866
         $elapsedTime = round(
867
-            microtime(true) - $this->request->server->get('REQUEST_TIME_FLOAT'),
867
+            microtime(true)-$this->request->server->get('REQUEST_TIME_FLOAT'),
868 868
             3
869 869
         );
870 870
 
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
     public function addFullPageTitlesAndContinue(string $key, array $out, array $data): array
906 906
     {
907 907
         // Add full_page_title (in addition to the existing page_title and page_namespace keys).
908
-        $out[$key] = array_map(function ($rev) {
908
+        $out[$key] = array_map(function($rev) {
909 909
             return array_merge([
910 910
                 'full_page_title' => $this->getPageFromNsAndTitle(
911 911
                     (int)$rev['page_namespace'],
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
         $conn = $this->container->get('doctrine')
942 942
             ->getManager('default')
943 943
             ->getConnection();
944
-        $date =  date('Y-m-d');
944
+        $date = date('Y-m-d');
945 945
 
946 946
         // Increment count in timeline
947 947
         $existsSql = "SELECT 1 FROM usage_api_timeline
Please login to merge, or discard this patch.
src/Controller/EditCounterController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $sections = is_array($sectionsQuery) ? $sectionsQuery : explode('|', $sectionsQuery);
173 173
 
174 174
         // Filter out any invalid section IDs.
175
-        $sections = array_filter($sections, function ($section) {
175
+        $sections = array_filter($sections, function($section) {
176 176
             return in_array($section, $this->getSectionNames());
177 177
         });
178 178
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         }
243 243
 
244 244
         $ret = [
245
-            'xtTitle' => $this->user->getUsername() . ' - ' . $this->project->getTitle(),
245
+            'xtTitle' => $this->user->getUsername().' - '.$this->project->getTitle(),
246 246
             'xtPage' => 'EditCounter',
247 247
             'user' => $this->user,
248 248
             'project' => $this->project,
Please login to merge, or discard this patch.
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/AutomatedEditsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,7 @@
 block discarded – undo
272 272
             'total_editcount' => $this->autoEdits->getEditCount(),
273 273
             'automated_editcount' => $this->autoEdits->getAutomatedCount(),
274 274
         ];
275
-        $ret['nonautomated_editcount'] = $ret['total_editcount'] - $ret['automated_editcount'];
275
+        $ret['nonautomated_editcount'] = $ret['total_editcount']-$ret['automated_editcount'];
276 276
 
277 277
         if (isset($this->params['tools'])) {
278 278
             $tools = $this->autoEdits->getToolCounts();
Please login to merge, or discard this patch.