@@ -1,5 +1,5 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace App\Monolog; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace App\Exception; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace App\EventSubscriber; |
| 6 | 6 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace App\Repository; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace App\Repository; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace App\Repository; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace App\Repository; |
| 5 | 5 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |