Passed
Push — dependabot/npm_and_yarn/webpac... ( 977ca1 )
by
unknown
06:36
created
src/Repository/UserRightsRepository.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\Repository;
6 6
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             return $this->cache->getItem($cacheKey)->get();
114 114
         }
115 115
 
116
-        $rightsPaths = array_map(function ($right) {
116
+        $rightsPaths = array_map(function($right) {
117 117
             return "Group-$right-member";
118 118
         }, $this->getRawRightsNames($project));
119 119
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 FROM $revisionTable
257 257
                 WHERE rev_actor = :actorId
258 258
                 AND rev_timestamp >= $offset
259
-                LIMIT 1 OFFSET ".($edits - 1);
259
+                LIMIT 1 OFFSET ".($edits-1);
260 260
 
261 261
         $ret = $this->executeProjectsQuery($project, $sql, [
262 262
             'actorId' => $user->getActorId($project),
Please login to merge, or discard this patch.
src/Repository/AutoEditsRepository.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
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         if ('all' !== $namespace) {
53 53
             // Limit by namespace.
54
-            return array_filter($this->aeTools, function (array $tool) use ($namespace) {
54
+            return array_filter($this->aeTools, function(array $tool) use ($namespace) {
55 55
                 return empty($tool['namespaces']) ||
56 56
                     in_array((int)$namespace, $tool['namespaces']) ||
57 57
                     (
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             $tagJoin = "LEFT OUTER JOIN $tagTable ON ct_rev_id = rev_id";
148 148
             $condTools[] = "ct_tag_id IN ($tagIds)";
149 149
         }
150
-        $condTool = 'AND (' . implode(' OR ', $condTools) . ')';
150
+        $condTool = 'AND ('.implode(' OR ', $condTools).')';
151 151
 
152 152
         $sql = "SELECT COUNT(DISTINCT(rev_id))
153 153
                 FROM $revisionTable
@@ -392,8 +392,8 @@  discard block
 block discarded – undo
392 392
         }
393 393
 
394 394
         // Sort the array by count
395
-        uasort($results, function ($a, $b) {
396
-            return $b['count'] - $a['count'];
395
+        uasort($results, function($a, $b) {
396
+            return $b['count']-$a['count'];
397 397
         });
398 398
 
399 399
         // Cache and return.
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
             if (isset($values['tags'])) {
585 585
                 $tags = array_merge(
586 586
                     $tags,
587
-                    array_map(function ($tag) use ($conn) {
587
+                    array_map(function($tag) use ($conn) {
588 588
                         return $conn->quote($tag, PDO::PARAM_STR);
589 589
                     }, $values['tags'])
590 590
                 );
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 
619 619
         if ($tagExcludes && 1 === count($tagIds)) {
620 620
             // Get tag IDs, filtering out those for which no ID exists (meaning there is no local tag for that tool).
621
-            $excludesList = implode(',', array_filter(array_map(function ($tagName) use ($project) {
621
+            $excludesList = implode(',', array_filter(array_map(function($tagName) use ($project) {
622 622
                 return $this->getTags($project)[$tagName] ?? null;
623 623
             }, $tagExcludes)));
624 624
 
Please login to merge, or discard this patch.
src/Model/AutoEdits.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
 
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
     public function getToolsTotal(): int
265 265
     {
266 266
         if (!isset($this->toolsTotal)) {
267
-            $this->toolsTotal = array_reduce($this->getToolCounts(), function ($a, $b) {
268
-                return $a + $b['count'];
267
+            $this->toolsTotal = array_reduce($this->getToolCounts(), function($a, $b) {
268
+                return $a+$b['count'];
269 269
             });
270 270
         }
271 271
 
Please login to merge, or discard this patch.
src/Model/Model.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\Model;
5 5
 
Please login to merge, or discard this patch.
src/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
 namespace App\Model;
5 5
 
Please login to merge, or discard this patch.
src/Model/AdminScore.php 1 patch
Spacing   +4 added lines, -4 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
 
@@ -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/Model/AdminStats.php 1 patch
Spacing   +6 added lines, -6 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
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $stats = $this->groupStatsByUsername($stats);
99 99
 
100 100
         // Resort, as for some reason the SQL doesn't do this properly.
101
-        uasort($stats, function ($a, $b) {
101
+        uasort($stats, function($a, $b) {
102 102
             if ($a['total'] === $b['total']) {
103 103
                 return 0;
104 104
             }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $this->usersAndGroups = $this->project->getUsersInGroups($groupUserGroups['local'], $groupUserGroups['global']);
127 127
 
128 128
         // Populate $this->usersInGroup with users who are in the relevant user group for $this->group.
129
-        $this->usersInGroup = array_keys(array_filter($this->usersAndGroups, function ($groups) {
129
+        $this->usersInGroup = array_keys(array_filter($this->usersAndGroups, function($groups) {
130 130
             return in_array($this->getRelevantUserGroup(), $groups);
131 131
         }));
132 132
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         if ($wikiPath) {
152
-            $out = array_map(function ($url) {
152
+            $out = array_map(function($url) {
153 153
                 return str_replace('.svg.png', '.svg', preg_replace('/.*\/18px-/', '', $url));
154 154
             }, $out);
155 155
         }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function numDays(): int
165 165
     {
166
-        return (int)(($this->end - $this->start) / 60 / 60 / 24) + 1;
166
+        return (int)(($this->end-$this->start) / 60 / 60 / 24)+1;
167 167
     }
168 168
 
169 169
     /**
@@ -253,6 +253,6 @@  discard block
 block discarded – undo
253 253
      */
254 254
     public function getNumWithActionsNotInGroup(): int
255 255
     {
256
-        return count($this->adminStats) - $this->numWithActions;
256
+        return count($this->adminStats)-$this->numWithActions;
257 257
     }
258 258
 }
Please login to merge, or discard this patch.
src/Model/PageAssessments.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\Model;
5 5
 
Please login to merge, or discard this patch.
src/Model/SimpleEditCounter.php 1 patch
Spacing   +2 added lines, -2 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
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function getTotalEditCount(): int
156 156
     {
157
-        return $this->data['total_edit_count'] ?? $this->data['deleted_edit_count'] + $this->data['live_edit_count'];
157
+        return $this->data['total_edit_count'] ?? $this->data['deleted_edit_count']+$this->data['live_edit_count'];
158 158
     }
159 159
 
160 160
     /**
Please login to merge, or discard this patch.