Passed
Push — dependency-injection ( 1a3514...1a37d3 )
by MusikAnimal
04:41
created
src/EventSubscriber/ExceptionListener.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\EventSubscriber;
6 6
 
Please login to merge, or discard this patch.
src/EventSubscriber/RateLimitSubscriber.php 1 patch
Spacing   +5 added lines, -5 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\EventSubscriber;
6 6
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         $cacheItem = $this->cache->getItem($cacheKey);
141 141
 
142 142
         // If increment value already in cache, or start with 1.
143
-        $count = $cacheItem->isHit() ? (int) $cacheItem->get() + 1 : 1;
143
+        $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1;
144 144
 
145 145
         // Check if limit has been exceeded, and if so, throw an error.
146 146
         if ($count > $this->rateLimit) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $cacheItem = $this->cache->getItem($cacheKey);
181 181
 
182 182
         // If increment value already in cache, or start with 1.
183
-        $count = $cacheItem->isHit() ? (int)$cacheItem->get() + 1 : 1;
183
+        $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1;
184 184
 
185 185
         // Check if limit has been exceeded, and if so, add a log entry.
186 186
         if ($count > 3) {
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
         $message = $this->i18n->msg('error-rate-limit', [
256 256
             $this->rateDuration,
257 257
             "<a href='/login'>".$this->i18n->msg('error-rate-limit-login')."</a>",
258
-            "<a href='https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/API' target='_blank'>" .
259
-                $this->i18n->msg('api') .
258
+            "<a href='https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/API' target='_blank'>".
259
+                $this->i18n->msg('api').
260 260
             "</a>",
261 261
         ]);
262 262
 
Please login to merge, or discard this patch.
src/Repository/PagesRepository.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\Repository;
5 5
 
Please login to merge, or discard this patch.
src/Repository/Repository.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\Repository;
6 6
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         // $tableExtension in order to generate the new table name
208 208
         if ($this->isWMF && null !== $tableExtension) {
209 209
             $mapped = true;
210
-            $tableName .=('' === $tableExtension ? '' : '_'.$tableExtension);
210
+            $tableName .= ('' === $tableExtension ? '' : '_'.$tableExtension);
211 211
         } elseif ($this->container->hasParameter("app.table.$tableName")) {
212 212
             // Use the table specified in the table mapping configuration, if present.
213 213
             $mapped = true;
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         // This is a safeguard in case table mapping isn't properly set up.
220 220
         $isLoggingOrRevision = in_array($tableName, ['revision', 'logging', 'archive']);
221 221
         if (!$mapped && $isLoggingOrRevision && $this->isWMF) {
222
-            $tableName .="_userindex";
222
+            $tableName .= "_userindex";
223 223
         }
224 224
 
225 225
         // Figure out database name.
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
             $offset = date('YmdHis', $offset);
339 339
             $datesConditions .= " AND {$tableAlias}{$field} <= '$offset'";
340 340
         } elseif (is_int($end)) {
341
-            $end = date('Ymd', $end) . '235959';
341
+            $end = date('Ymd', $end).'235959';
342 342
             $datesConditions .= " AND {$tableAlias}{$field} <= '$end'";
343 343
         }
344 344
 
Please login to merge, or discard this patch.
src/Repository/EditSummaryRepository.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\Repository;
5 5
 
Please login to merge, or discard this patch.
src/Repository/ProjectRepository.php 1 patch
Spacing   +5 added lines, -5 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
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         }
130 130
 
131 131
         if ($this->container->hasParameter("database_meta_table")) {
132
-            $table = $this->container->getParameter('database_meta_name') . '.' .
132
+            $table = $this->container->getParameter('database_meta_name').'.'.
133 133
                 $this->container->getParameter('database_meta_table');
134 134
         } else {
135 135
             $table = "meta_p.wiki";
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     || $projMetadata['url'] == "https://$project"
179 179
                     || $projMetadata['url'] == "https://$project.org"
180 180
                     || $projMetadata['url'] == "https://www.$project") {
181
-                    $this->logger->debug(__METHOD__ . " Using cached data for $project");
181
+                    $this->logger->debug(__METHOD__." Using cached data for $project");
182 182
                     return $projMetadata;
183 183
                 }
184 184
             }
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         $optedIn = $this->container->getParameter('opted_in');
328 328
         // In case there's just one given.
329 329
         if (!is_array($optedIn)) {
330
-            $optedIn = [ $optedIn ];
330
+            $optedIn = [$optedIn];
331 331
         }
332 332
         return $optedIn;
333 333
     }
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
         ]])->getBody()->getContents(), true);
380 380
 
381 381
         $extensions = $res['query']['extensions'] ?? [];
382
-        return array_map(function ($extension) {
382
+        return array_map(function($extension) {
383 383
             return $extension['name'];
384 384
         }, $extensions);
385 385
     }
Please login to merge, or discard this patch.
src/Repository/UserRepository.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\Repository;
5 5
 
Please login to merge, or discard this patch.
src/Repository/AdminScoreRepository.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\Repository;
5 5
 
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
 
@@ -173,10 +173,10 @@  discard block
 block discarded – undo
173 173
         ])->fetchAllAssociative();
174 174
 
175 175
         $logCounts = array_combine(
176
-            array_map(function ($e) {
176
+            array_map(function($e) {
177 177
                 return $e['source'];
178 178
             }, $results),
179
-            array_map(function ($e) {
179
+            array_map(function($e) {
180 180
                 return (int)$e['value'];
181 181
             }, $results)
182 182
         );
@@ -256,10 +256,10 @@  discard block
 block discarded – undo
256 256
         }
257 257
 
258 258
         $counts = array_combine(
259
-            array_map(function ($e) {
259
+            array_map(function($e) {
260 260
                 return $e['key'];
261 261
             }, $results),
262
-            array_map(function ($e) {
262
+            array_map(function($e) {
263 263
                 return (int)$e['val'];
264 264
             }, $results)
265 265
         );
@@ -441,9 +441,9 @@  discard block
 block discarded – undo
441 441
 
442 442
         $results = $this->executeProjectsQuery($project, $sql, $params)->fetchAll();
443 443
 
444
-        $namespaceTotals = array_combine(array_map(function ($e) {
444
+        $namespaceTotals = array_combine(array_map(function($e) {
445 445
             return $e['page_namespace'];
446
-        }, $results), array_map(function ($e) {
446
+        }, $results), array_map(function($e) {
447 447
             return (int)$e['total'];
448 448
         }, $results));
449 449
 
Please login to merge, or discard this patch.