Completed
Pull Request — master (#95)
by Matthew
02:33
created
src/AppBundle/Controller/EditSummaryController.php 1 patch
Spacing   +5 added lines, -7 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 'xtSubtitle' => 'tool-es-desc',
93 93
                 'xtPage' => 'es',
94 94
                 'project' => $theProject,
95
-                'namespace' => (int) $namespace,
95
+                'namespace' => (int)$namespace,
96 96
             ]
97 97
         );
98 98
     }
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
     {
159 159
         $dbName = $project->getDatabaseName();
160 160
 
161
-        $cacheKey = 'editsummaryusage.' . $dbName . '.'
162
-            . $user->getCacheKey() . '.' . $namespace;
161
+        $cacheKey = 'editsummaryusage.'.$dbName.'.'
162
+            . $user->getCacheKey().'.'.$namespace;
163 163
 
164 164
         $cache = $this->container->get('cache.app');
165 165
         if ($cache->hasItem($cacheKey)) {
@@ -246,8 +246,7 @@  discard block
 block discarded – undo
246 246
             if ($row['rev_minor_edit'] == 0) {
247 247
                 if ($row['rev_comment'] !== '') {
248 248
                     isset($monthEditsummaryTotals[$monthkey]) ?
249
-                        $monthEditsummaryTotals[$monthkey]++ :
250
-                        $monthEditsummaryTotals[$monthkey] = 1;
249
+                        $monthEditsummaryTotals[$monthkey]++ : $monthEditsummaryTotals[$monthkey] = 1;
251 250
                     $totalSummariesMajor++;
252 251
                 }
253 252
 
@@ -264,8 +263,7 @@  discard block
 block discarded – undo
264 263
                 // If there is a comment, count it
265 264
                 if ($row['rev_comment'] !== '') {
266 265
                     isset($monthEditsummaryTotals[$monthkey]) ?
267
-                        $monthEditsummaryTotals[$monthkey]++ :
268
-                        $monthEditsummaryTotals[$monthkey] = 1;
266
+                        $monthEditsummaryTotals[$monthkey]++ : $monthEditsummaryTotals[$monthkey] = 1;
269 267
                     $totalSummariesMinor++;
270 268
                     $totalEditsMinor++;
271 269
                 } else {
Please login to merge, or discard this patch.
src/Xtools/User.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $this->getUsername()
90 90
         );
91 91
 
92
-        return (int) $editCount;
92
+        return (int)$editCount;
93 93
     }
94 94
 
95 95
     /**
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     public function countAutomatedEdits(Project $project, $namespace = 'all', $start = '', $end = '')
206 206
     {
207
-        return (int) $this->getRepository()->countAutomatedEdits($project, $this, $namespace, $start, $end);
207
+        return (int)$this->getRepository()->countAutomatedEdits($project, $this, $namespace, $start, $end);
208 208
     }
209 209
 
210 210
     /**
@@ -236,21 +236,21 @@  discard block
 block discarded – undo
236 236
 
237 237
         $namespaces = $project->getNamespaces();
238 238
 
239
-        return array_map(function ($rev) use ($namespaces) {
239
+        return array_map(function($rev) use ($namespaces) {
240 240
             $pageTitle = $rev['page_title'];
241 241
 
242 242
             if ($rev['page_namespace'] !== '0') {
243
-                $pageTitle = $namespaces[$rev['page_namespace']] . ":$pageTitle";
243
+                $pageTitle = $namespaces[$rev['page_namespace']].":$pageTitle";
244 244
             }
245 245
 
246 246
             return [
247 247
                 'page_title' => $pageTitle,
248
-                'page_namespace' => (int) $rev['page_namespace'],
249
-                'rev_id' => (int) $rev['rev_id'],
248
+                'page_namespace' => (int)$rev['page_namespace'],
249
+                'rev_id' => (int)$rev['rev_id'],
250 250
                 'timestamp' => DateTime::createFromFormat('YmdHis', $rev['timestamp']),
251
-                'minor' => (bool) $rev['minor'],
252
-                'length' => (int) $rev['length'],
253
-                'length_change' => (int) $rev['length_change'],
251
+                'minor' => (bool)$rev['minor'],
252
+                'length' => (int)$rev['length'],
253
+                'length_change' => (int)$rev['length_change'],
254 254
                 'comment' => $rev['comment'],
255 255
             ];
256 256
         }, $revs);
Please login to merge, or discard this patch.