@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace AppBundle\Repository; |
| 5 | 5 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $slice = $this->getDbList()[$dbName]; |
| 166 | 166 | // actor_revision table only includes users who have made at least one edit. |
| 167 | 167 | $actorTable = $this->getTableName($dbName, 'actor', 'revision'); |
| 168 | - $queriesBySlice[$slice][] = "SELECT '$dbName' AS `dbName`, actor_id " . |
|
| 168 | + $queriesBySlice[$slice][] = "SELECT '$dbName' AS `dbName`, actor_id ". |
|
| 169 | 169 | "FROM $actorTable WHERE actor_name = :actor"; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -262,13 +262,13 @@ discard block |
||
| 262 | 262 | // Re-assemble into UNIONed queries, executing as many per slice as possible. |
| 263 | 263 | $revisions = []; |
| 264 | 264 | foreach ($queriesBySlice as $slice => $queries) { |
| 265 | - $sql = "SELECT * FROM ((\n" . join("\n) UNION (\n", $queries) . ")) a ORDER BY timestamp DESC LIMIT $limit"; |
|
| 265 | + $sql = "SELECT * FROM ((\n".join("\n) UNION (\n", $queries).")) a ORDER BY timestamp DESC LIMIT $limit"; |
|
| 266 | 266 | $revisions = array_merge($revisions, $this->executeProjectsQuery($slice, $sql)->fetchAll()); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | // If there are more than $limit results, re-sort by timestamp. |
| 270 | 270 | if (count($revisions) > $limit) { |
| 271 | - usort($revisions, function ($a, $b) { |
|
| 271 | + usort($revisions, function($a, $b) { |
|
| 272 | 272 | if ($a['unix_timestamp'] === $b['unix_timestamp']) { |
| 273 | 273 | return 0; |
| 274 | 274 | } |