Passed
Push — master ( 95d2e4...8875f5 )
by MusikAnimal
05:41
created
src/Xtools/ArticleInfo.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     public function getMaxRevisions()
245 245
     {
246 246
         if (!isset($this->maxRevisions)) {
247
-            $this->maxRevisions = (int) $this->container->getParameter('app.max_page_revisions');
247
+            $this->maxRevisions = (int)$this->container->getParameter('app.max_page_revisions');
248 248
         }
249 249
         return $this->maxRevisions;
250 250
     }
@@ -1017,7 +1017,7 @@  discard block
 block discarded – undo
1017 1017
         $this->yearMonthCounts[$editYear]['all']++;
1018 1018
         $this->yearMonthCounts[$editYear]['months'][$editMonth]['all']++;
1019 1019
         // This will ultimately be the size of the page by the end of the year
1020
-        $this->yearMonthCounts[$editYear]['size'] = (int) $edit->getLength();
1020
+        $this->yearMonthCounts[$editYear]['size'] = (int)$edit->getLength();
1021 1021
 
1022 1022
         // Keep track of which month had the most edits
1023 1023
         $editsThisMonth = $this->yearMonthCounts[$editYear]['months'][$editMonth]['all'];
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
         $editYear = $edit->getYear();
1038 1038
 
1039 1039
         // Beginning of the month at 00:00:00.
1040
-        $firstEditTime = mktime(0, 0, 0, (int) $this->firstEdit->getMonth(), 1, $this->firstEdit->getYear());
1040
+        $firstEditTime = mktime(0, 0, 0, (int)$this->firstEdit->getMonth(), 1, $this->firstEdit->getYear());
1041 1041
 
1042 1042
         $this->yearMonthCounts[$editYear] = [
1043 1043
             'all' => 0,
@@ -1169,14 +1169,14 @@  discard block
 block discarded – undo
1169 1169
         $botData = $this->getRepository()->getBotData($this->page, $this->start, $this->end);
1170 1170
         while ($bot = $botData->fetch()) {
1171 1171
             $bots[$bot['username']] = [
1172
-                'count' => (int) $bot['count'],
1172
+                'count' => (int)$bot['count'],
1173 1173
                 'current' => $bot['current'] === 'bot',
1174 1174
             ];
1175 1175
         }
1176 1176
 
1177 1177
         // Sort by edit count.
1178
-        uasort($bots, function ($a, $b) {
1179
-            return $b['count'] - $a['count'];
1178
+        uasort($bots, function($a, $b) {
1179
+            return $b['count']-$a['count'];
1180 1180
         });
1181 1181
 
1182 1182
         $this->bots = $bots;
@@ -1290,7 +1290,7 @@  discard block
 block discarded – undo
1290 1290
 
1291 1291
             if ($info['all'] > 1) {
1292 1292
                 // Number of seconds/days between first and last edit.
1293
-                $secs = $info['last']->getTimestamp() - $info['first']->getTimestamp();
1293
+                $secs = $info['last']->getTimestamp()-$info['first']->getTimestamp();
1294 1294
                 $days = $secs / (60 * 60 * 24);
1295 1295
 
1296 1296
                 // Average time between edits (in days).
@@ -1302,7 +1302,7 @@  discard block
 block discarded – undo
1302 1302
 
1303 1303
         // First sort editors array by the amount of text they added.
1304 1304
         $topTenEditorsByAdded = $this->editors;
1305
-        uasort($topTenEditorsByAdded, function ($a, $b) {
1305
+        uasort($topTenEditorsByAdded, function($a, $b) {
1306 1306
             if ($a['added'] === $b['added']) {
1307 1307
                 return 0;
1308 1308
             }
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
 
1312 1312
         // Then build a new array of top 10 editors by added text,
1313 1313
         // in the data structure needed for the chart.
1314
-        $this->topTenEditorsByAdded = array_map(function ($editor) {
1314
+        $this->topTenEditorsByAdded = array_map(function($editor) {
1315 1315
             $added = $this->editors[$editor]['added'];
1316 1316
             return [
1317 1317
                 'label' => $editor,
@@ -1465,7 +1465,7 @@  discard block
 block discarded – undo
1465 1465
 
1466 1466
         $refs = $crawler->filter('#mw-content-text .reference');
1467 1467
         $refContent = [];
1468
-        $refs->each(function ($ref) use (&$refContent) {
1468
+        $refs->each(function($ref) use (&$refContent) {
1469 1469
             $refContent[] = $ref->text();
1470 1470
         });
1471 1471
         $uniqueRefs = count(array_unique($refContent));
@@ -1493,7 +1493,7 @@  discard block
 block discarded – undo
1493 1493
         $totalChars = 0;
1494 1494
         $totalWords = 0;
1495 1495
         $paragraphs = $crawler->filter($selector);
1496
-        $paragraphs->each(function ($node) use (&$totalChars, &$totalWords) {
1496
+        $paragraphs->each(function($node) use (&$totalChars, &$totalWords) {
1497 1497
             $text = preg_replace('/\[\d+\]/', '', trim($node->text()));
1498 1498
             $totalChars += strlen($text);
1499 1499
             $totalWords += count(explode(' ', $text));
Please login to merge, or discard this patch.