Passed
Push — dependabot/npm_and_yarn/scss-t... ( 60cc5d...84306d )
by
unknown
44:47 queued 26:09
created
src/Repository/GlobalContribsRepository.php 1 patch
Spacing   +4 added lines, -4 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 App\Repository;
5 5
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             $slice = $this->getDbList()[$dbName];
175 175
             // actor_revision table only includes users who have made at least one edit.
176 176
             $actorTable = $this->getTableName($dbName, 'actor', 'revision');
177
-            $queriesBySlice[$slice][] = "SELECT '$dbName' AS `dbName`, actor_id " .
177
+            $queriesBySlice[$slice][] = "SELECT '$dbName' AS `dbName`, actor_id ".
178 178
                 "FROM $actorTable WHERE $whereClause";
179 179
         }
180 180
 
@@ -309,13 +309,13 @@  discard block
 block discarded – undo
309 309
         // Re-assemble into UNIONed queries, executing as many per slice as possible.
310 310
         $revisions = [];
311 311
         foreach ($queriesBySlice as $slice => $queries) {
312
-            $sql = "SELECT * FROM ((\n" . join("\n) UNION (\n", $queries) . ")) a ORDER BY timestamp DESC LIMIT $limit";
312
+            $sql = "SELECT * FROM ((\n".join("\n) UNION (\n", $queries).")) a ORDER BY timestamp DESC LIMIT $limit";
313 313
             $revisions = array_merge($revisions, $this->executeProjectsQuery($slice, $sql)->fetchAllAssociative());
314 314
         }
315 315
 
316 316
         // If there are more than $limit results, re-sort by timestamp.
317 317
         if (count($revisions) > $limit) {
318
-            usort($revisions, function ($a, $b) {
318
+            usort($revisions, function($a, $b) {
319 319
                 if ($a['unix_timestamp'] === $b['unix_timestamp']) {
320 320
                     return 0;
321 321
                 }
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
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the EditCounterRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace App\Repository;
9 9
 
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
         ])->fetchAllAssociative();
141 141
 
142 142
         $logCounts = array_combine(
143
-            array_map(function ($e) {
143
+            array_map(function($e) {
144 144
                 return $e['source'];
145 145
             }, $results),
146
-            array_map(function ($e) {
146
+            array_map(function($e) {
147 147
                 return (int)$e['value'];
148 148
             }, $results)
149 149
         );
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
         }
224 224
 
225 225
         $counts = array_combine(
226
-            array_map(function ($e) {
226
+            array_map(function($e) {
227 227
                 return $e['key'];
228 228
             }, $results),
229
-            array_map(function ($e) {
229
+            array_map(function($e) {
230 230
                 return (int)$e['val'];
231 231
             }, $results)
232 232
         );
@@ -408,9 +408,9 @@  discard block
 block discarded – undo
408 408
 
409 409
         $results = $this->executeProjectsQuery($project, $sql, $params)->fetchAll();
410 410
 
411
-        $namespaceTotals = array_combine(array_map(function ($e) {
411
+        $namespaceTotals = array_combine(array_map(function($e) {
412 412
             return $e['page_namespace'];
413
-        }, $results), array_map(function ($e) {
413
+        }, $results), array_map(function($e) {
414 414
             return (int)$e['total'];
415 415
         }, $results));
416 416
 
Please login to merge, or discard this patch.
src/Repository/PageRepository.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 PageRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace App\Repository;
9 9
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 
306 306
         $wikidataId = ltrim($page->getWikidataId(), 'Q');
307 307
 
308
-        $sql = "SELECT " . ($count ? 'COUNT(*) AS count' : '*') . "
308
+        $sql = "SELECT ".($count ? 'COUNT(*) AS count' : '*')."
309 309
                 FROM wikidatawiki_p.wb_items_per_site
310 310
                 WHERE ips_item_id = :wikidataId";
311 311
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             'wikidataId' => $wikidataId,
314 314
         ])->fetchAllAssociative();
315 315
 
316
-        return $count ? (int) $result[0]['count'] : $result;
316
+        return $count ? (int)$result[0]['count'] : $result;
317 317
     }
318 318
 
319 319
     /**
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 
352 352
         // Transform to associative array by 'type'
353 353
         foreach ($res as $row) {
354
-            $data[$row['type'] . '_count'] = (int)$row['value'];
354
+            $data[$row['type'].'_count'] = (int)$row['value'];
355 355
         }
356 356
 
357 357
         return $data;
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
         $project = $page->getProject()->getDomain();
397 397
 
398
-        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/' .
398
+        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/'.
399 399
             "$project/all-access/user/$title/daily/$start/$end";
400 400
 
401 401
         $res = $client->request('GET', $url);
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             $normalized = [];
472 472
             if (isset($result['query']['normalized'])) {
473 473
                 array_map(
474
-                    function ($e) use (&$normalized): void {
474
+                    function($e) use (&$normalized): void {
475 475
                         $normalized[$e['to']] = $e['from'];
476 476
                     },
477 477
                     $result['query']['normalized']
Please login to merge, or discard this patch.