Passed
Pull Request — master (#369)
by MarcoAurelio
15:42
created
src/AppBundle/Model/AutoEdits.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the AutoEdits class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
     public function getToolsTotal(): int
226 226
     {
227 227
         if (!is_int($this->toolsTotal)) {
228
-            $this->toolsTotal = array_reduce($this->getToolCounts(), function ($a, $b) {
229
-                return $a + $b['count'];
228
+            $this->toolsTotal = array_reduce($this->getToolCounts(), function($a, $b) {
229
+                return $a+$b['count'];
230 230
             });
231 231
         }
232 232
 
Please login to merge, or discard this patch.
src/AppBundle/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 AppBundle\Twig;
9 9
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function requestTime(): float
113 113
     {
114 114
         if (!isset($this->requestTime)) {
115
-            $this->requestTime = microtime(true) - $this->getRequest()->server->get('REQUEST_TIME_FLOAT');
115
+            $this->requestTime = microtime(true)-$this->getRequest()->server->get('REQUEST_TIME_FLOAT');
116 116
         }
117 117
 
118 118
         return $this->requestTime;
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
         }
552 552
 
553 553
         $sizeMessage = $this->numberFormat(
554
-            pow(1024, $base - floor($base)),
554
+            pow(1024, $base-floor($base)),
555 555
             $precision
556 556
         );
557 557
 
@@ -708,15 +708,15 @@  discard block
 block discarded – undo
708 708
 
709 709
         if ($seconds >= 86400) {
710 710
             // Over a day
711
-            $val = (int) floor($seconds / 86400);
711
+            $val = (int)floor($seconds / 86400);
712 712
             $key = 'days';
713 713
         } elseif ($seconds >= 3600) {
714 714
             // Over an hour, less than a day
715
-            $val = (int) floor($seconds / 3600);
715
+            $val = (int)floor($seconds / 3600);
716 716
             $key = 'hours';
717 717
         } elseif ($seconds >= 60) {
718 718
             // Over a minute, less than an hour
719
-            $val = (int) floor($seconds / 60);
719
+            $val = (int)floor($seconds / 60);
720 720
             $key = 'minutes';
721 721
         }
722 722
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/AutoEditsRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the AutoEditsRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         if ('all' !== $namespace) {
38 38
             // Limit by namespace.
39
-            return array_filter($this->aeTools, function (array $tool) use ($namespace) {
39
+            return array_filter($this->aeTools, function(array $tool) use ($namespace) {
40 40
                 return empty($tool['namespaces']) ||
41 41
                     in_array((int)$namespace, $tool['namespaces']) ||
42 42
                     (
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $tagJoin = "LEFT OUTER JOIN $tagTable ON ct_rev_id = rev_id";
92 92
             $condTools[] = "ct_tag_id IN ($tagIds)";
93 93
         }
94
-        $condTool = 'AND (' . implode(' OR ', $condTools) . ')';
94
+        $condTool = 'AND ('.implode(' OR ', $condTools).')';
95 95
 
96 96
         $sql = "SELECT COUNT(DISTINCT(rev_id))
97 97
                 FROM $revisionTable
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
         }
312 312
 
313 313
         // Sort the array by count
314
-        uasort($results, function ($a, $b) {
315
-            return $b['count'] - $a['count'];
314
+        uasort($results, function($a, $b) {
315
+            return $b['count']-$a['count'];
316 316
         });
317 317
 
318 318
         // Cache and return.
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
             if (isset($values['tags'])) {
485 485
                 $tags = array_merge(
486 486
                     $tags,
487
-                    array_map(function ($tag) use ($conn) {
487
+                    array_map(function($tag) use ($conn) {
488 488
                         return $conn->quote($tag, \PDO::PARAM_STR);
489 489
                     }, $values['tags'])
490 490
                 );
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 
519 519
         if ($tagExcludes && 1 === count($tagIds)) {
520 520
             // Get tag IDs, filtering out those for which no ID exists (meaning there is no local tag for that tool).
521
-            $excludesList = implode(',', array_filter(array_map(function ($tagName) use ($project) {
521
+            $excludesList = implode(',', array_filter(array_map(function($tagName) use ($project) {
522 522
                 return $this->getTags($project)[$tagName] ?? null;
523 523
             }, $tagExcludes)));
524 524
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/GlobalContribsRepository.php 1 patch
Spacing   +3 added lines, -3 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
 namespace AppBundle\Repository;
5 5
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         foreach ($dbNames as $dbName) {
164 164
             // actor_revision table only includes users who have made at least one edit.
165 165
             $actorTable = $this->getTableName($dbName, 'actor', 'revision');
166
-            $sqlParts []= "SELECT '$dbName' AS `dbName`, actor_id
166
+            $sqlParts [] = "SELECT '$dbName' AS `dbName`, actor_id
167 167
                            FROM $actorTable WHERE actor_name = :actor";
168 168
         }
169 169
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                 $queries[] = $sql;
247 247
             }
248 248
         }
249
-        $sql = "SELECT * FROM ((\n" . join("\n) UNION (\n", $queries) . ")) a ORDER BY timestamp DESC LIMIT $limit";
249
+        $sql = "SELECT * FROM ((\n".join("\n) UNION (\n", $queries).")) a ORDER BY timestamp DESC LIMIT $limit";
250 250
 
251 251
         if (is_numeric($offset)) {
252 252
             $sql .= " OFFSET $offset";
Please login to merge, or discard this patch.