Completed
Push — master ( 68373c...37b628 )
by MusikAnimal
02:33
created
src/AppBundle/Controller/ApiController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $view = View::create()->setStatusCode(Response::HTTP_OK);
169 169
 
170 170
         if ($request->query->get('format') === 'html') {
171
-            $edits = array_map(function ($attrs) use ($project, $username) {
171
+            $edits = array_map(function($attrs) use ($project, $username) {
172 172
                 $page = $project->getRepository()
173 173
                     ->getPage($project, $attrs['full_page_title']);
174 174
                 $pageTitles[] = $attrs['full_page_title'];
@@ -244,19 +244,19 @@  discard block
 block discarded – undo
244 244
         $info = $page->getBasicEditingInfo();
245 245
         $creationDateTime = DateTime::createFromFormat('YmdHis', $info['created_at']);
246 246
         $modifiedDateTime = DateTime::createFromFormat('YmdHis', $info['modified_at']);
247
-        $secsSinceLastEdit = (new DateTime)->getTimestamp() - $modifiedDateTime->getTimestamp();
247
+        $secsSinceLastEdit = (new DateTime)->getTimestamp()-$modifiedDateTime->getTimestamp();
248 248
 
249 249
         $data = [
250
-            'revisions' => (int) $info['num_edits'],
251
-            'editors' => (int) $info['num_editors'],
250
+            'revisions' => (int)$info['num_edits'],
251
+            'editors' => (int)$info['num_editors'],
252 252
             'author' => $info['author'],
253
-            'author_editcount' => (int) $info['author_editcount'],
253
+            'author_editcount' => (int)$info['author_editcount'],
254 254
             'created_at' => $creationDateTime->format('Y-m-d'),
255 255
             'created_rev_id' => $info['created_rev_id'],
256 256
             'modified_at' => $modifiedDateTime->format('Y-m-d H:i'),
257 257
             'secs_since_last_edit' => $secsSinceLastEdit,
258
-            'last_edit_id' => (int) $info['modified_rev_id'],
259
-            'watchers' => (int) $page->getWatchers(),
258
+            'last_edit_id' => (int)$info['modified_rev_id'],
259
+            'watchers' => (int)$page->getWatchers(),
260 260
             'pageviews' => $page->getLastPageviews($pageviewsOffset),
261 261
             'pageviews_offset' => $pageviewsOffset,
262 262
         ];
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         }
315 315
 
316 316
         $conn = $this->getDoctrine()->getManager('default')->getConnection();
317
-        $date =  date('Y-m-d');
317
+        $date = date('Y-m-d');
318 318
 
319 319
         // Increment count in timeline
320 320
         $existsSql = "SELECT 1 FROM usage_timeline
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,23 +236,23 @@  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
             $fullPageTitle = '';
242 242
 
243 243
             if ($rev['page_namespace'] !== '0') {
244
-                $fullPageTitle = $namespaces[$rev['page_namespace']] . ":$pageTitle";
244
+                $fullPageTitle = $namespaces[$rev['page_namespace']].":$pageTitle";
245 245
             }
246 246
 
247 247
             return [
248 248
                 'full_page_title' => $fullPageTitle,
249 249
                 'page_title' => $pageTitle,
250
-                'page_namespace' => (int) $rev['page_namespace'],
251
-                'rev_id' => (int) $rev['rev_id'],
250
+                'page_namespace' => (int)$rev['page_namespace'],
251
+                'rev_id' => (int)$rev['rev_id'],
252 252
                 'timestamp' => DateTime::createFromFormat('YmdHis', $rev['timestamp']),
253
-                'minor' => (bool) $rev['minor'],
254
-                'length' => (int) $rev['length'],
255
-                'length_change' => (int) $rev['length_change'],
253
+                'minor' => (bool)$rev['minor'],
254
+                'length' => (int)$rev['length'],
255
+                'length_change' => (int)$rev['length_change'],
256 256
                 'comment' => $rev['comment'],
257 257
             ];
258 258
         }, $revs);
Please login to merge, or discard this patch.