@@ -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\Model; |
5 | 5 | |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | |
101 | 101 | if ($sorted) { |
102 | 102 | // Sort. |
103 | - uasort($this->globalEditCounts, function ($a, $b) { |
|
104 | - return $b['total'] - $a['total']; |
|
103 | + uasort($this->globalEditCounts, function($a, $b) { |
|
104 | + return $b['total']-$a['total']; |
|
105 | 105 | }); |
106 | 106 | } |
107 | 107 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $this->namespace, |
139 | 139 | $this->start, |
140 | 140 | $this->end, |
141 | - $this->limit + 1, |
|
141 | + $this->limit+1, |
|
142 | 142 | $this->offset |
143 | 143 | ); |
144 | 144 | $globalEdits = []; |
@@ -20,4 +20,4 @@ |
||
20 | 20 | $_SERVER += $_ENV; |
21 | 21 | $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; |
22 | 22 | $_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; |
23 | -$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; |
|
23 | +$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int)$_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | Request::setTrustedHosts([$trustedHosts]); |
21 | 21 | } |
22 | 22 | |
23 | -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
23 | +$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); |
|
24 | 24 | $request = Request::createFromGlobals(); |
25 | 25 | $response = $kernel->handle($request); |
26 | 26 | $response->send(); |
@@ -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\Model; |
5 | 5 |
@@ -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 |