Test Failed
Pull Request — master (#130)
by MusikAnimal
03:50
created
src/Xtools/ArticleInfo.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function getMaxRevisions()
157 157
     {
158 158
         if (!isset($this->maxRevisions)) {
159
-            $this->maxRevisions = (int) $this->container->getParameter('app.max_page_revisions');
159
+            $this->maxRevisions = (int)$this->container->getParameter('app.max_page_revisions');
160 160
         }
161 161
         return $this->maxRevisions;
162 162
     }
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
         $this->yearMonthCounts[$editYear]['all']++;
820 820
         $this->yearMonthCounts[$editYear]['months'][$editMonth]['all']++;
821 821
         // This will ultimately be the size of the page by the end of the year
822
-        $this->yearMonthCounts[$editYear]['size'] = (int) $edit->getLength();
822
+        $this->yearMonthCounts[$editYear]['size'] = (int)$edit->getLength();
823 823
 
824 824
         // Keep track of which month had the most edits
825 825
         $editsThisMonth = $this->yearMonthCounts[$editYear]['months'][$editMonth]['all'];
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
         $editYear = $edit->getYear();
839 839
 
840 840
         // Beginning of the month at 00:00:00.
841
-        $firstEditTime = mktime(0, 0, 0, (int) $this->firstEdit->getMonth(), 1, $this->firstEdit->getYear());
841
+        $firstEditTime = mktime(0, 0, 0, (int)$this->firstEdit->getMonth(), 1, $this->firstEdit->getYear());
842 842
 
843 843
         $this->yearMonthCounts[$editYear] = [
844 844
             'all' => 0,
@@ -973,14 +973,14 @@  discard block
 block discarded – undo
973 973
         $botData = $this->getRepository()->getBotData($this->page);
974 974
         while ($bot = $botData->fetch()) {
975 975
             $bots[$bot['username']] = [
976
-                'count' => (int) $bot['count'],
976
+                'count' => (int)$bot['count'],
977 977
                 'current' => $bot['current'] === 'bot',
978 978
             ];
979 979
         }
980 980
 
981 981
         // Sort by edit count.
982
-        uasort($bots, function ($a, $b) {
983
-            return $b['count'] - $a['count'];
982
+        uasort($bots, function($a, $b) {
983
+            return $b['count']-$a['count'];
984 984
         });
985 985
 
986 986
         $this->bots = $bots;
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
 
1092 1092
             if ($info['all'] > 1) {
1093 1093
                 // Number of seconds/days between first and last edit.
1094
-                $secs = $info['last']->getTimestamp() - $info['first']->getTimestamp();
1094
+                $secs = $info['last']->getTimestamp()-$info['first']->getTimestamp();
1095 1095
                 $days = $secs / (60 * 60 * 24);
1096 1096
 
1097 1097
                 // Average time between edits (in days).
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
 
1111 1111
         // First sort editors array by the amount of text they added.
1112 1112
         $topTenEditorsByAdded = $this->editors;
1113
-        uasort($topTenEditorsByAdded, function ($a, $b) {
1113
+        uasort($topTenEditorsByAdded, function($a, $b) {
1114 1114
             if ($a['added'] === $b['added']) {
1115 1115
                 return 0;
1116 1116
             }
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
 
1120 1120
         // Then build a new array of top 10 editors by added text,
1121 1121
         // in the data structure needed for the chart.
1122
-        $this->topTenEditorsByAdded = array_map(function ($editor) {
1122
+        $this->topTenEditorsByAdded = array_map(function($editor) {
1123 1123
             $added = $this->editors[$editor]['added'];
1124 1124
             return [
1125 1125
                 'label' => $editor,
Please login to merge, or discard this patch.