Passed
Push — main ( d52aaf...b49fc5 )
by
unknown
09:11
created
src/Model/EditCounter.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Model;
6 6
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
         // Filter out unblocks unless requested.
162 162
         if ($blocksOnly) {
163
-            $blocks = array_filter($blocks, function ($block) {
163
+            $blocks = array_filter($blocks, function($block) {
164 164
                 return 'block' === $block['log_action'];
165 165
             });
166 166
         }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function countAllRevisions(): int
196 196
     {
197
-        return $this->countLiveRevisions() + $this->countDeletedRevisions();
197
+        return $this->countLiveRevisions()+$this->countDeletedRevisions();
198 198
     }
199 199
 
200 200
     /**
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function countAllPagesEdited(): int
235 235
     {
236
-        return $this->countLivePagesEdited() + $this->countDeletedPagesEdited();
236
+        return $this->countLivePagesEdited()+$this->countDeletedPagesEdited();
237 237
     }
238 238
 
239 239
     /**
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      */
244 244
     public function countPagesCreated(): int
245 245
     {
246
-        return $this->countCreatedPagesLive() + $this->countPagesCreatedDeleted();
246
+        return $this->countCreatedPagesLive()+$this->countPagesCreatedDeleted();
247 247
     }
248 248
 
249 249
     /**
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
             } elseif ('unblock' === $block['log_action']) {
373 373
                 // The last block was lifted. So the duration will be the time from when the
374 374
                 // last block was set to the time of the unblock.
375
-                $timeSinceLastBlock = $timestamp - $lastBlock[0];
375
+                $timeSinceLastBlock = $timestamp-$lastBlock[0];
376 376
                 if ($timeSinceLastBlock > $this->longestBlockSeconds) {
377 377
                     $this->longestBlockSeconds = $timeSinceLastBlock;
378 378
 
@@ -383,8 +383,8 @@  discard block
 block discarded – undo
383 383
                 // The last block was modified. So we will adjust $lastBlock to include
384 384
                 // the difference of the duration of the new reblock, and time since the last block.
385 385
                 // $lastBlock is left unchanged if its duration was indefinite.
386
-                $timeSinceLastBlock = $timestamp - $lastBlock[0];
387
-                $lastBlock[1] = $timeSinceLastBlock + $duration;
386
+                $timeSinceLastBlock = $timestamp-$lastBlock[0];
387
+                $lastBlock[1] = $timeSinceLastBlock+$duration;
388 388
             }
389 389
         }
390 390
 
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         }
395 395
 
396 396
         // Test if the last block is still active, and if so use the expiry as the duration.
397
-        $lastBlockExpiry = $lastBlock[0] + $lastBlock[1];
397
+        $lastBlockExpiry = $lastBlock[0]+$lastBlock[1];
398 398
         if ($lastBlockExpiry > time() && $lastBlockExpiry > $this->longestBlockSeconds) {
399 399
             $this->longestBlockSeconds = $lastBlock[1];
400 400
         // Otherwise, test if the duration of the last block is now the longest overall.
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
         // If invalid, $duration is left as null.
439 439
         if (strtotime($durationStr)) {
440 440
             $expiry = strtotime($durationStr, $timestamp);
441
-            $duration = $expiry - $timestamp;
441
+            $duration = $expiry-$timestamp;
442 442
         }
443 443
 
444 444
         return [$timestamp, $duration];
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
         $import = $logCounts['import-import'] ?? 0;
526 526
         $interwiki = $logCounts['import-interwiki'] ?? 0;
527 527
         $upload = $logCounts['import-upload'] ?? 0;
528
-        return $import + $interwiki + $upload;
528
+        return $import+$interwiki+$upload;
529 529
     }
530 530
 
531 531
     /**
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         $logCounts = $this->getLogCounts();
548 548
         $new = $logCounts['contentmodel-new'] ?? 0;
549 549
         $modified = $logCounts['contentmodel-change'] ?? 0;
550
-        return $new + $modified;
550
+        return $new+$modified;
551 551
     }
552 552
 
553 553
     /**
@@ -676,9 +676,9 @@  discard block
 block discarded – undo
676 676
     public function approvals(): int
677 677
     {
678 678
         $logCounts = $this->getLogCounts();
679
-        return (!empty($logCounts['review-approve']) ? $logCounts['review-approve'] : 0) +
680
-            (!empty($logCounts['review-approve2']) ? $logCounts['review-approve2'] : 0) +
681
-            (!empty($logCounts['review-approve-i']) ? $logCounts['review-approve-i'] : 0) +
679
+        return (!empty($logCounts['review-approve']) ? $logCounts['review-approve'] : 0)+
680
+            (!empty($logCounts['review-approve2']) ? $logCounts['review-approve2'] : 0)+
681
+            (!empty($logCounts['review-approve-i']) ? $logCounts['review-approve-i'] : 0)+
682 682
             (!empty($logCounts['review-approve2-i']) ? $logCounts['review-approve2-i'] : 0);
683 683
     }
684 684
 
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
         $logCounts = $this->getLogCounts();
702 702
         $create2 = $logCounts['newusers-create2'] ?: 0;
703 703
         $byemail = $logCounts['newusers-byemail'] ?: 0;
704
-        return $create2 + $byemail;
704
+        return $create2+$byemail;
705 705
     }
706 706
 
707 707
     /**
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 
804 804
         $totals = $this->repository->getMonthCounts($this->project, $this->user);
805 805
         $out = [
806
-            'yearLabels' => [],  // labels for years
806
+            'yearLabels' => [], // labels for years
807 807
             'monthLabels' => [], // labels for months
808 808
             'totals' => [], // actual totals, grouped by namespace, year and then month
809 809
         ];
@@ -1022,7 +1022,7 @@  discard block
 block discarded – undo
1022 1022
     public function countSmallEdits(): int
1023 1023
     {
1024 1024
         $editSizeData = $this->getEditSizeData();
1025
-        return isset($editSizeData['small_edits']) ? (int) $editSizeData['small_edits'] : 0;
1025
+        return isset($editSizeData['small_edits']) ? (int)$editSizeData['small_edits'] : 0;
1026 1026
     }
1027 1027
 
1028 1028
     /**
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
     public function countLargeEdits(): int
1033 1033
     {
1034 1034
         $editSizeData = $this->getEditSizeData();
1035
-        return isset($editSizeData['large_edits']) ? (int) $editSizeData['large_edits'] : 0;
1035
+        return isset($editSizeData['large_edits']) ? (int)$editSizeData['large_edits'] : 0;
1036 1036
     }
1037 1037
 
1038 1038
     /**
Please login to merge, or discard this patch.
src/Helper/I18nHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Helper;
6 6
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         // Find the path, and complain if English doesn't exist.
57
-        $path = $this->projectDir . '/i18n';
57
+        $path = $this->projectDir.'/i18n';
58 58
         if (!file_exists("$path/en.json")) {
59 59
             throw new Exception("Language directory doesn't exist: $path");
60 60
         }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $messageFiles = glob($this->projectDir.'/i18n/*.json');
106 106
 
107 107
         $languages = array_values(array_unique(array_map(
108
-            function ($filename) {
108
+            function($filename) {
109 109
                 return basename($filename, '.json');
110 110
             },
111 111
             $messageFiles
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             $this->getIntuition()->getLangFallbacks($useLang)
150 150
         );
151 151
 
152
-        return array_filter($fallbacks, function ($lang) use ($i18nPath) {
152
+        return array_filter($fallbacks, function($lang) use ($i18nPath) {
153 153
             return is_file($i18nPath.$lang.'.json');
154 154
         });
155 155
     }
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      */
288 288
     private function getLangForTranslatingNumerals(): string
289 289
     {
290
-        return 'ar' === $this->getIntuition()->getLang() ? 'en': $this->getIntuition()->getLang();
290
+        return 'ar' === $this->getIntuition()->getLang() ? 'en' : $this->getIntuition()->getLang();
291 291
     }
292 292
 
293 293
     /**
Please login to merge, or discard this patch.
src/Model/PageInfo.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1319,10 +1319,10 @@
 block discarded – undo
1319 1319
         // Slice to the top 10.
1320 1320
         $topTenEditorsByAdded = array_keys(array_slice($topTenEditorsByAdded, 0, 10, true));
1321 1321
 
1322
-         // Get the sum of added text so that we can add in percentages.
1323
-         $topTenTotalAdded = array_sum(array_map(function ($editor) {
1324
-             return $this->editors[$editor]['added'];
1325
-         }, $topTenEditorsByAdded));
1322
+            // Get the sum of added text so that we can add in percentages.
1323
+            $topTenTotalAdded = array_sum(array_map(function ($editor) {
1324
+                return $this->editors[$editor]['added'];
1325
+            }, $topTenEditorsByAdded));
1326 1326
 
1327 1327
         // Then build a new array of top 10 editors by added text in the data structure needed for the chart.
1328 1328
         return array_map(function ($editor) use ($topTenTotalAdded) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Model;
6 6
 
@@ -958,16 +958,16 @@  discard block
 block discarded – undo
958 958
 
959 959
             if ($info['all'] > 1) {
960 960
                 // Number of seconds/days between first and last edit.
961
-                $secs = $info['last']->getTimestamp() - $info['first']->getTimestamp();
961
+                $secs = $info['last']->getTimestamp()-$info['first']->getTimestamp();
962 962
                 $days = $secs / (60 * 60 * 24);
963 963
 
964 964
                 // Average time between edits (in days).
965
-                $this->editors[$editor]['atbe'] = round($days / ($info['all'] - 1), 1);
965
+                $this->editors[$editor]['atbe'] = round($days / ($info['all']-1), 1);
966 966
             }
967 967
         }
968 968
 
969 969
         // Loop through again and add percentages.
970
-        $this->topTenEditorsByEdits = array_map(function ($editor) use ($topTenCount) {
970
+        $this->topTenEditorsByEdits = array_map(function($editor) use ($topTenCount) {
971 971
             $editor['percentage'] = 100 * ($editor['value'] / $topTenCount);
972 972
             return $editor;
973 973
         }, $topTenEditorsByEdits);
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
     {
986 986
         // First sort editors array by the amount of text they added.
987 987
         $topTenEditorsByAdded = $this->editors;
988
-        uasort($topTenEditorsByAdded, function ($a, $b) {
988
+        uasort($topTenEditorsByAdded, function($a, $b) {
989 989
             if ($a['added'] === $b['added']) {
990 990
                 return 0;
991 991
             }
@@ -996,12 +996,12 @@  discard block
 block discarded – undo
996 996
         $topTenEditorsByAdded = array_keys(array_slice($topTenEditorsByAdded, 0, 10, true));
997 997
 
998 998
          // Get the sum of added text so that we can add in percentages.
999
-         $topTenTotalAdded = array_sum(array_map(function ($editor) {
999
+         $topTenTotalAdded = array_sum(array_map(function($editor) {
1000 1000
              return $this->editors[$editor]['added'];
1001 1001
          }, $topTenEditorsByAdded));
1002 1002
 
1003 1003
         // Then build a new array of top 10 editors by added text in the data structure needed for the chart.
1004
-        return array_map(function ($editor) use ($topTenTotalAdded) {
1004
+        return array_map(function($editor) use ($topTenTotalAdded) {
1005 1005
             $added = $this->editors[$editor]['added'];
1006 1006
             return [
1007 1007
                 'label' => $editor,
Please login to merge, or discard this patch.
src/Repository/PageInfoRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Repository;
6 6
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
         $sql = "SELECT log_action, log_type, log_timestamp AS 'timestamp'
175 175
                 FROM $loggingTable
176
-                WHERE log_namespace = '" . $page->getNamespace() . "'
176
+                WHERE log_namespace = '".$page->getNamespace()."'
177 177
                 AND log_title = :title AND log_timestamp > 1 $datesConditions
178 178
                 AND log_type IN ('delete', 'move', 'protect', 'stable')";
179 179
         $title = str_replace(' ', '_', $page->getTitle());
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         $time2 = time();
359 359
 
360 360
         // If it took over 5 seconds, cache the result for 20 minutes.
361
-        if ($time2 - $time1 > 5) {
361
+        if ($time2-$time1 > 5) {
362 362
             $this->setCache($cacheKey, $result, 'PT20M');
363 363
         }
364 364
 
@@ -429,8 +429,8 @@  discard block
 block discarded – undo
429 429
         }
430 430
 
431 431
         // Sort the array by count
432
-        uasort($results, function ($a, $b) {
433
-            return $b['count'] - $a['count'];
432
+        uasort($results, function($a, $b) {
433
+            return $b['count']-$a['count'];
434 434
         });
435 435
 
436 436
         return $this->setCache($cacheKey, $results);
Please login to merge, or discard this patch.
src/Model/Pages.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Model;
6 6
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         }
135 135
 
136 136
         $numResults = count($this->getResults()[$this->getNamespace()]);
137
-        $timestamp = new DateTime($this->getResults()[$this->getNamespace()][$numResults - 1]['timestamp']);
137
+        $timestamp = new DateTime($this->getResults()[$this->getNamespace()][$numResults-1]['timestamp']);
138 138
         return $timestamp->format('Y-m-d\TH:i:s\Z');
139 139
     }
140 140
 
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
         $summaryColumns[] = 'average-page-size';
343 343
 
344 344
         // Re-sort based on $order
345
-        return array_values(array_filter($order, static function ($column) use ($summaryColumns) {
345
+        return array_values(array_filter($order, static function($column) use ($summaryColumns) {
346 346
             return in_array($column, $summaryColumns);
347 347
         }));
348 348
     }
Please login to merge, or discard this patch.
src/Model/PageInfoApi.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Model;
6 6
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         [$bytes, $chars, $words] = $this->countCharsAndWords($crawler);
181 181
 
182 182
         $refContent = [];
183
-        $refs->each(function ($ref) use (&$refContent): void {
183
+        $refs->each(function($ref) use (&$refContent): void {
184 184
             $refContent[] = $ref->text();
185 185
         });
186 186
         $uniqueRefs = count(array_unique($refContent));
@@ -215,13 +215,13 @@  discard block
 block discarded – undo
215 215
             '[typeof~="mw:Extension/templatestyles"]',
216 216
             '[typeof~="mw:Extension/math"]',
217 217
             '[typeof~="mw:Extension/ref"]',
218
-        ]))->each(function (Crawler $subCrawler) {
218
+        ]))->each(function(Crawler $subCrawler) {
219 219
             foreach ($subCrawler as $subNode) {
220 220
                 $subNode->parentNode->removeChild($subNode);
221 221
             }
222 222
         });
223 223
 
224
-        $paragraphs->each(function ($node) use (&$totalBytes, &$totalChars, &$totalWords): void {
224
+        $paragraphs->each(function($node) use (&$totalBytes, &$totalChars, &$totalWords): void {
225 225
             /** @var Crawler $node */
226 226
             $text = $node->text();
227 227
             $totalBytes += strlen($text);
@@ -306,24 +306,24 @@  discard block
 block discarded – undo
306 306
         if ($info) {
307 307
             $creationDateTime = DateTime::createFromFormat('YmdHis', $info['created_at']);
308 308
             $modifiedDateTime = DateTime::createFromFormat('YmdHis', $info['modified_at']);
309
-            $secsSinceLastEdit = (new DateTime)->getTimestamp() - $modifiedDateTime->getTimestamp();
309
+            $secsSinceLastEdit = (new DateTime)->getTimestamp()-$modifiedDateTime->getTimestamp();
310 310
 
311 311
             $assessment = $page->getProject()
312 312
                 ->getPageAssessments()
313 313
                 ->getAssessment($page);
314 314
 
315 315
             $data = array_merge($data, [
316
-                'revisions' => (int) $info['num_edits'],
317
-                'editors' => (int) $info['num_editors'],
318
-                'ip_edits' => (int) $info['ip_edits'],
319
-                'minor_edits' => (int) $info['minor_edits'],
316
+                'revisions' => (int)$info['num_edits'],
317
+                'editors' => (int)$info['num_editors'],
318
+                'ip_edits' => (int)$info['ip_edits'],
319
+                'minor_edits' => (int)$info['minor_edits'],
320 320
                 'creator' => $info['creator'],
321
-                'creator_editcount' => null === $info['creator_editcount'] ? null : (int) $info['creator_editcount'],
321
+                'creator_editcount' => null === $info['creator_editcount'] ? null : (int)$info['creator_editcount'],
322 322
                 'created_at' => $creationDateTime,
323 323
                 'created_rev_id' => $info['created_rev_id'],
324 324
                 'modified_at' => $modifiedDateTime,
325 325
                 'secs_since_last_edit' => $secsSinceLastEdit,
326
-                'modified_rev_id' => (int) $info['modified_rev_id'],
326
+                'modified_rev_id' => (int)$info['modified_rev_id'],
327 327
                 'assessment' => $assessment,
328 328
             ]);
329 329
         }
@@ -473,8 +473,8 @@  discard block
 block discarded – undo
473 473
         }
474 474
 
475 475
         // Sort by edit count.
476
-        uasort($this->bots, function ($a, $b) {
477
-            return $b['count'] - $a['count'];
476
+        uasort($this->bots, function($a, $b) {
477
+            return $b['count']-$a['count'];
478 478
         });
479 479
 
480 480
         return $this->bots;
Please login to merge, or discard this patch.
src/Model/Edit.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Model;
6 6
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         User $user,
113 113
         array $revs
114 114
     ): array {
115
-        return array_map(function ($rev) use ($pageRepo, $editRepo, $userRepo, $project, $user) {
115
+        return array_map(function($rev) use ($pageRepo, $editRepo, $userRepo, $project, $user) {
116 116
             /** Page object to be passed to the Edit constructor. */
117 117
             $page = Page::newFromRow($pageRepo, $project, $rev);
118 118
             $rev['user'] = $user;
@@ -358,8 +358,8 @@  discard block
 block discarded – undo
358 358
             // Must have underscores for the link to properly go to the section.
359 359
             $sectionTitleLink = htmlspecialchars(str_replace(' ', '_', $sectionTitle));
360 360
 
361
-            $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>" .
362
-                "<em class='text-muted'>" . htmlspecialchars($sectionTitle) . ":</em> ";
361
+            $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>".
362
+                "<em class='text-muted'>".htmlspecialchars($sectionTitle).":</em> ";
363 363
             $summary = str_replace($sectionMatch[0][0], $sectionWikitext, $summary);
364 364
         }
365 365
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
      */
407 407
     public function getDiffUrl(): string
408 408
     {
409
-        return rtrim($this->getProject()->getUrlForPage('Special:Diff/' . $this->id), '/');
409
+        return rtrim($this->getProject()->getUrlForPage('Special:Diff/'.$this->id), '/');
410 410
     }
411 411
 
412 412
     /**
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      */
416 416
     public function getPermaUrl(): string
417 417
     {
418
-        return rtrim($this->getProject()->getUrlForPage('Special:PermaLink/' . $this->id), '/');
418
+        return rtrim($this->getProject()->getUrlForPage('Special:PermaLink/'.$this->id), '/');
419 419
     }
420 420
 
421 421
     /**
Please login to merge, or discard this patch.
src/Controller/GlobalContribsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace App\Controller;
6 6
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         $this->project = $defaultProject;
231 231
 
232 232
         $results = $globalContribs->globalEdits();
233
-        $results = array_map(function (Edit $edit) {
233
+        $results = array_map(function(Edit $edit) {
234 234
             return $edit->getForJson(true);
235 235
         }, array_values($results));
236 236
         $results = $this->addFullPageTitlesAndContinue('globalcontribs', [], $results);
Please login to merge, or discard this patch.
src/Controller/TopEditsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         // Send all to the template.
178 178
         return $this->getFormattedResponse('topedits/result_page', [
179 179
             'xtPage' => 'TopEdits',
180
-            'xtTitle' => $this->user->getUsername() . ' - ' . $this->page->getTitle(),
180
+            'xtTitle' => $this->user->getUsername().' - '.$this->page->getTitle(),
181 181
             'te' => $topEdits,
182 182
         ]);
183 183
     }
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
         $topEdits->prepareData();
316 316
 
317 317
         return $this->getFormattedApiResponse([
318
-            'top_edits' => array_map(function (Edit $edit) {
318
+            'top_edits' => array_map(function(Edit $edit) {
319 319
                 return $edit->getForJson();
320 320
             }, $topEdits->getTopEdits()),
321 321
         ]);
Please login to merge, or discard this patch.