Passed
Push — main ( 69bc4d...436711 )
by
unknown
04:16
created
src/AppBundle/Repository/TopEditsRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the TopEditsRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments() && 0 === $namespace;
66 66
         $paTable = $project->getTableName('page_assessments');
67 67
         $paSelect = $hasPageAssessments
68
-            ?  ", (
68
+            ? ", (
69 69
                     SELECT pa_class
70 70
                     FROM $paTable
71 71
                     WHERE pa_page_id = page_id
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments();
180 180
         $pageAssessmentsTable = $this->getTableName($project->getDatabaseName(), 'page_assessments');
181 181
         $paSelect = $hasPageAssessments
182
-            ?  ", (
182
+            ? ", (
183 183
                     SELECT pa_class
184 184
                     FROM $pageAssessmentsTable
185 185
                     WHERE pa_page_id = e.page_id
Please login to merge, or discard this patch.
src/AppBundle/Model/ArticleInfoApi.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace AppBundle\Model;
5 5
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
         $refs = $crawler->filter('#mw-content-text .reference');
150 150
         $refContent = [];
151
-        $refs->each(function ($ref) use (&$refContent): void {
151
+        $refs->each(function($ref) use (&$refContent): void {
152 152
             $refContent[] = $ref->text();
153 153
         });
154 154
         $uniqueRefs = count(array_unique($refContent));
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $totalChars = 0;
177 177
         $totalWords = 0;
178 178
         $paragraphs = $crawler->filter($selector);
179
-        $paragraphs->each(function ($node) use (&$totalChars, &$totalWords): void {
179
+        $paragraphs->each(function($node) use (&$totalChars, &$totalWords): void {
180 180
             /** @var Crawler $node */
181 181
             $text = preg_replace('/\[\d+]/', '', trim($node->text(null, true)));
182 182
             $totalChars += strlen($text);
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         $data = [
241 241
             'project' => $project->getDomain(),
242 242
             'page' => $page->getTitle(),
243
-            'watchers' => (int) $page->getWatchers(),
243
+            'watchers' => (int)$page->getWatchers(),
244 244
             'pageviews' => $page->getLastPageviews($pageviewsOffset),
245 245
             'pageviews_offset' => $pageviewsOffset,
246 246
         ];
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         if (false !== $info) {
266 266
             $creationDateTime = DateTime::createFromFormat('YmdHis', $info['created_at']);
267 267
             $modifiedDateTime = DateTime::createFromFormat('YmdHis', $info['modified_at']);
268
-            $secsSinceLastEdit = (new DateTime)->getTimestamp() - $modifiedDateTime->getTimestamp();
268
+            $secsSinceLastEdit = (new DateTime)->getTimestamp()-$modifiedDateTime->getTimestamp();
269 269
 
270 270
             // Some wikis (such foundation.wikimedia.org) may be missing the creation date.
271 271
             $creationDateTime = false === $creationDateTime
@@ -277,16 +277,16 @@  discard block
 block discarded – undo
277 277
                 ->getAssessment($page);
278 278
 
279 279
             $data = array_merge($data, [
280
-                'revisions' => (int) $info['num_edits'],
281
-                'editors' => (int) $info['num_editors'],
282
-                'minor_edits' => (int) $info['minor_edits'],
280
+                'revisions' => (int)$info['num_edits'],
281
+                'editors' => (int)$info['num_editors'],
282
+                'minor_edits' => (int)$info['minor_edits'],
283 283
                 'author' => $info['author'],
284
-                'author_editcount' => null === $info['author_editcount'] ? null : (int) $info['author_editcount'],
284
+                'author_editcount' => null === $info['author_editcount'] ? null : (int)$info['author_editcount'],
285 285
                 'created_at' => $creationDateTime,
286 286
                 'created_rev_id' => $info['created_rev_id'],
287 287
                 'modified_at' => $modifiedDateTime->format('Y-m-d H:i'),
288 288
                 'secs_since_last_edit' => $secsSinceLastEdit,
289
-                'last_edit_id' => (int) $info['modified_rev_id'],
289
+                'last_edit_id' => (int)$info['modified_rev_id'],
290 290
                 'assessment' => $assessment,
291 291
             ]);
292 292
         }
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
         }
437 437
 
438 438
         // Sort by edit count.
439
-        uasort($this->bots, function ($a, $b) {
440
-            return $b['count'] - $a['count'];
439
+        uasort($this->bots, function($a, $b) {
440
+            return $b['count']-$a['count'];
441 441
         });
442 442
 
443 443
         return $this->bots;
Please login to merge, or discard this patch.