Passed
Pull Request — master (#225)
by MusikAnimal
10:55
created
src/AppBundle/Twig/AppExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 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 AppExtension class.
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function requestTime(): float
109 109
     {
110 110
         if (!isset($this->requestTime)) {
111
-            $this->requestTime = microtime(true) - $this->getRequest()->server->get('REQUEST_TIME_FLOAT');
111
+            $this->requestTime = microtime(true)-$this->getRequest()->server->get('REQUEST_TIME_FLOAT');
112 112
         }
113 113
 
114 114
         return $this->requestTime;
@@ -660,15 +660,15 @@  discard block
 block discarded – undo
660 660
 
661 661
         if ($seconds >= 86400) {
662 662
             // Over a day
663
-            $val = (int) floor($seconds / 86400);
663
+            $val = (int)floor($seconds / 86400);
664 664
             $key = 'days';
665 665
         } elseif ($seconds >= 3600) {
666 666
             // Over an hour, less than a day
667
-            $val = (int) floor($seconds / 3600);
667
+            $val = (int)floor($seconds / 3600);
668 668
             $key = 'hours';
669 669
         } elseif ($seconds >= 60) {
670 670
             // Over a minute, less than an hour
671
-            $val = (int) floor($seconds / 60);
671
+            $val = (int)floor($seconds / 60);
672 672
             $key = 'minutes';
673 673
         }
674 674
 
Please login to merge, or discard this patch.
src/AppBundle/Model/TopEdits.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the TopEdits class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $firstDateTime = $this->topEdits[0]->getTimestamp();
141 141
         $lastDateTime = end($this->topEdits)->getTimestamp();
142
-        $secs = $firstDateTime->getTimestamp() - $lastDateTime->getTimestamp();
142
+        $secs = $firstDateTime->getTimestamp()-$lastDateTime->getTimestamp();
143 143
         $days = $secs / (60 * 60 * 24);
144 144
         return $days / count($this->topEdits);
145 145
     }
@@ -311,9 +311,9 @@  discard block
 block discarded – undo
311 311
         $displayTitles = $this->getDisplayTitles($pages);
312 312
 
313 313
         foreach ($pages as $page) {
314
-            $nsId = (int) $page['page_namespace'];
315
-            $nsTitle = $nsId > 0 ? $this->project->getNamespaces()[$page['page_namespace']] . ':' : '';
316
-            $pageTitle = $nsTitle . $page['page_title'];
314
+            $nsId = (int)$page['page_namespace'];
315
+            $nsTitle = $nsId > 0 ? $this->project->getNamespaces()[$page['page_namespace']].':' : '';
316
+            $pageTitle = $nsTitle.$page['page_title'];
317 317
             $page['displaytitle'] = $displayTitles[$pageTitle];
318 318
 
319 319
             // $page['page_title'] is retained without the namespace
@@ -340,11 +340,11 @@  discard block
 block discarded – undo
340 340
         $namespaces = $this->project->getNamespaces();
341 341
 
342 342
         // First extract page titles including namespace.
343
-        $pageTitles = array_map(function ($page) use ($namespaces) {
343
+        $pageTitles = array_map(function($page) use ($namespaces) {
344 344
             // If non-mainspace, prepend namespace to the titles.
345 345
             $ns = $page['page_namespace'];
346
-            $nsTitle = $ns > 0 ? $namespaces[$page['page_namespace']] . ':' : '';
347
-            return $nsTitle . $page['page_title'];
346
+            $nsTitle = $ns > 0 ? $namespaces[$page['page_namespace']].':' : '';
347
+            return $nsTitle.$page['page_title'];
348 348
         }, $topPages);
349 349
 
350 350
         return $this->getRepository()->getDisplayTitles($this->project, $pageTitles);
Please login to merge, or discard this patch.
src/AppBundle/Model/PageAssessments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the PageAssessments class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Model/EditSummary.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 EditSummary class.
Please login to merge, or discard this patch.
src/AppBundle/Model/AdminStats.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the AdminStats class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function numDays(): int
117 117
     {
118
-        return (int)(($this->end - $this->start) / 60 / 60 / 24);
118
+        return (int)(($this->end-$this->start) / 60 / 60 / 24);
119 119
     }
120 120
 
121 121
     /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $stats = $this->groupAdminStatsByUsername($stats, $abbreviateGroups);
145 145
 
146 146
         // Resort, as for some reason the SQL isn't doing this properly.
147
-        uasort($stats, function ($a, $b) {
147
+        uasort($stats, function($a, $b) {
148 148
             if ($a['total'] === $b['total']) {
149 149
                 return 0;
150 150
             }
@@ -237,6 +237,6 @@  discard block
 block discarded – undo
237 237
      */
238 238
     public function getNumNonAdminsWithActions(): int
239 239
     {
240
-        return count($this->adminStats) - $this->numAdminsWithActions;
240
+        return count($this->adminStats)-$this->numAdminsWithActions;
241 241
     }
242 242
 }
Please login to merge, or discard this patch.
src/AppBundle/Model/AdminScore.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the AdminScore class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
                     $now = new DateTime();
104 104
                     $date = new DateTime($value);
105 105
                     $diff = $date->diff($now);
106
-                    $formula = 365 * (int)$diff->format('%y') + 30 *
107
-                        (int)$diff->format('%m') + (int)$diff->format('%d');
106
+                    $formula = 365 * (int)$diff->format('%y')+30 *
107
+                        (int)$diff->format('%m')+(int)$diff->format('%d');
108 108
                     if ($formula < 365) {
109 109
                         $this->multipliers['account-age-mult'] = 0;
110 110
                     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 }
113 113
             }
114 114
 
115
-            $multiplierKey = $row['source'] . '-mult';
115
+            $multiplierKey = $row['source'].'-mult';
116 116
             $multiplier = $this->multipliers[$multiplierKey] ?? 1;
117 117
             $score = max(min($value * $multiplier, 100), -100);
118 118
             $this->scores[$key]['mult'] = $multiplier;
Please login to merge, or discard this patch.
src/AppBundle/Model/Pages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the Pages class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/EditSummaryRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the EditSummaryRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/AdminScoreRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the AdminScoreRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.