@@ -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 | |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | return $this->cache->getItem($cacheKey)->get(); |
81 | 81 | } |
82 | 82 | |
83 | - $uri = 'https://meta.wikimedia.org/w/api.php?' . http_build_query([ |
|
83 | + $uri = 'https://meta.wikimedia.org/w/api.php?'.http_build_query([ |
|
84 | 84 | 'action' => 'query', |
85 | 85 | 'prop' => 'revisions', |
86 | 86 | 'rvprop' => 'content', |
87 | 87 | 'rvslots' => 'main', |
88 | 88 | 'format' => 'json', |
89 | 89 | 'formatversion' => 2, |
90 | - 'titles' => 'MediaWiki:XTools-AutoEdits.json' . ($useSandbox ? '/sandbox' : ''), |
|
90 | + 'titles' => 'MediaWiki:XTools-AutoEdits.json'.($useSandbox ? '/sandbox' : ''), |
|
91 | 91 | ]); |
92 | 92 | |
93 | 93 | if ($useSandbox && $this->session->get('logged_in_user')) { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | // Once last walk through for some tidying up and validation. |
153 | 153 | $invalid = []; |
154 | - array_walk($this->tools[$projectDomain], function (&$data, $tool) use (&$invalid): void { |
|
154 | + array_walk($this->tools[$projectDomain], function(&$data, $tool) use (&$invalid): void { |
|
155 | 155 | // Populate the 'label' with the tool name, if a label doesn't already exist. |
156 | 156 | $data['label'] = $data['label'] ?? $tool; |
157 | 157 | |
@@ -235,14 +235,14 @@ discard block |
||
235 | 235 | |
236 | 236 | $revertEntries = array_filter( |
237 | 237 | $this->getTools($project), |
238 | - function ($tool) { |
|
238 | + function($tool) { |
|
239 | 239 | return isset($tool['revert']) && isset($tool['regex']); |
240 | 240 | } |
241 | 241 | ); |
242 | 242 | |
243 | 243 | // If 'revert' is set to `true`, then use 'regex' as the regular expression, |
244 | 244 | // otherwise 'revert' is assumed to be the regex string. |
245 | - $this->revertTools[$projectDomain] = array_map(function ($revertTool) { |
|
245 | + $this->revertTools[$projectDomain] = array_map(function($revertTool) { |
|
246 | 246 | return [ |
247 | 247 | 'link' => $revertTool['link'], |
248 | 248 | 'regex' => true === $revertTool['revert'] ? $revertTool['regex'] : $revertTool['revert'], |