@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | * This file contains only the AutomatedEditsHelper class. |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -declare(strict_types = 1); |
|
| 6 | +declare(strict_types=1); |
|
| 7 | 7 | |
| 8 | 8 | namespace AppBundle\Helper; |
| 9 | 9 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | ); |
| 97 | 97 | |
| 98 | 98 | // Finally, populate the 'label' with the tool name, if a label doesn't already exist. |
| 99 | - array_walk($this->tools[$projectDomain], function (&$data, $tool): void { |
|
| 99 | + array_walk($this->tools[$projectDomain], function(&$data, $tool): void { |
|
| 100 | 100 | $data['label'] = $data['label'] ?? $tool; |
| 101 | 101 | |
| 102 | 102 | // 'namespaces' should be an array of ints. |
@@ -163,14 +163,14 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | $revertEntries = array_filter( |
| 165 | 165 | $this->getTools($project), |
| 166 | - function ($tool) { |
|
| 166 | + function($tool) { |
|
| 167 | 167 | return isset($tool['revert']); |
| 168 | 168 | } |
| 169 | 169 | ); |
| 170 | 170 | |
| 171 | 171 | // If 'revert' is set to `true`, then use 'regex' as the regular expression, |
| 172 | 172 | // otherwise 'revert' is assumed to be the regex string. |
| 173 | - $this->revertTools[$projectDomain] = array_map(function ($revertTool) { |
|
| 173 | + $this->revertTools[$projectDomain] = array_map(function($revertTool) { |
|
| 174 | 174 | return [ |
| 175 | 175 | 'link' => $revertTool['link'], |
| 176 | 176 | 'regex' => true === $revertTool['revert'] ? $revertTool['regex'] : $revertTool['revert'], |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | * This file contains only the AutoEditsRepository class. |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -declare(strict_types = 1); |
|
| 6 | +declare(strict_types=1); |
|
| 7 | 7 | |
| 8 | 8 | namespace AppBundle\Repository; |
| 9 | 9 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | if ('all' !== $namespace) { |
| 38 | 38 | // Limit by namespace. |
| 39 | - return array_filter($this->aeTools, function (array $tool) use ($namespace) { |
|
| 39 | + return array_filter($this->aeTools, function(array $tool) use ($namespace) { |
|
| 40 | 40 | return empty($tool['namespaces']) || |
| 41 | 41 | in_array((int)$namespace, $tool['namespaces']) || |
| 42 | 42 | ( |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $tagJoin = "LEFT OUTER JOIN $tagTable ON ct_rev_id = rev_id"; |
| 104 | 104 | $condTools[] = "ct_tag_id IN ($tagIds)"; |
| 105 | 105 | } |
| 106 | - $condTool = 'AND (' . implode(' OR ', $condTools) . ')'; |
|
| 106 | + $condTool = 'AND ('.implode(' OR ', $condTools).')'; |
|
| 107 | 107 | $userClause = $user->isAnon() ? 'rev_user_text = :username' : 'rev_user = :userId'; |
| 108 | 108 | |
| 109 | 109 | $sql = "SELECT COUNT(DISTINCT(rev_id)) |
@@ -339,8 +339,8 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | // Sort the array by count |
| 342 | - uasort($results, function ($a, $b) { |
|
| 343 | - return $b['count'] - $a['count']; |
|
| 342 | + uasort($results, function($a, $b) { |
|
| 343 | + return $b['count']-$a['count']; |
|
| 344 | 344 | }); |
| 345 | 345 | |
| 346 | 346 | // Cache and return. |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | if ('' === $condTool) { |
| 445 | 445 | $condTool = $tagClause; |
| 446 | 446 | } else { |
| 447 | - $condTool = '(' . $condTool . " OR $tagClause)"; |
|
| 447 | + $condTool = '('.$condTool." OR $tagClause)"; |
|
| 448 | 448 | } |
| 449 | 449 | } |
| 450 | 450 | |