@@ -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 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace App\DoctrineMigrations; |
| 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\DoctrineMigrations; |
| 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 | |
@@ -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\Helper; |
| 6 | 6 | |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | $session = $this->container->get('session'); |
| 85 | - $uri = 'https://meta.wikimedia.org/w/index.php?action=raw&ctype=application/json&title=' . |
|
| 86 | - 'MediaWiki:XTools-AutoEdits.json' . ($useSandbox ? '/sandbox' : ''); |
|
| 85 | + $uri = 'https://meta.wikimedia.org/w/index.php?action=raw&ctype=application/json&title='. |
|
| 86 | + 'MediaWiki:XTools-AutoEdits.json'.($useSandbox ? '/sandbox' : ''); |
|
| 87 | 87 | |
| 88 | 88 | if ($useSandbox && $session->get('logged_in_user')) { |
| 89 | 89 | // Request via OAuth to get around server-side caching. |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | // Once last walk through for some tidying up and validation. |
| 148 | 148 | $invalid = []; |
| 149 | - array_walk($this->tools[$projectDomain], function (&$data, $tool) use (&$invalid): void { |
|
| 149 | + array_walk($this->tools[$projectDomain], function(&$data, $tool) use (&$invalid): void { |
|
| 150 | 150 | // Populate the 'label' with the tool name, if a label doesn't already exist. |
| 151 | 151 | $data['label'] = $data['label'] ?? $tool; |
| 152 | 152 | |
@@ -230,14 +230,14 @@ discard block |
||
| 230 | 230 | |
| 231 | 231 | $revertEntries = array_filter( |
| 232 | 232 | $this->getTools($project), |
| 233 | - function ($tool) { |
|
| 233 | + function($tool) { |
|
| 234 | 234 | return isset($tool['revert']) && isset($tool['regex']); |
| 235 | 235 | } |
| 236 | 236 | ); |
| 237 | 237 | |
| 238 | 238 | // If 'revert' is set to `true`, then use 'regex' as the regular expression, |
| 239 | 239 | // otherwise 'revert' is assumed to be the regex string. |
| 240 | - $this->revertTools[$projectDomain] = array_map(function ($revertTool) { |
|
| 240 | + $this->revertTools[$projectDomain] = array_map(function($revertTool) { |
|
| 241 | 241 | return [ |
| 242 | 242 | 'link' => $revertTool['link'], |
| 243 | 243 | 'regex' => true === $revertTool['revert'] ? $revertTool['regex'] : $revertTool['revert'], |