Passed
Push — master ( 282d19...269ad4 )
by MusikAnimal
03:41
created
src/Xtools/Page.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $info = $this->getPageInfo();
82 82
         $title = isset($info['title']) ? $info['title'] : $this->unnormalizedPageName;
83 83
         $nsName = $this->getNamespaceName();
84
-        return str_replace($nsName . ':', '', $title);
84
+        return str_replace($nsName.':', '', $title);
85 85
     }
86 86
 
87 87
     /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     {
218 218
         // If a user is given, we will not cache the result via instance variable.
219 219
         if ($user !== null) {
220
-            return (int) $this->getRepository()->getNumRevisions($this, $user);
220
+            return (int)$this->getRepository()->getNumRevisions($this, $user);
221 221
         }
222 222
 
223 223
         // Return cached value, if present.
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             $this->numRevisions = count($this->revisions);
231 231
         } else {
232 232
             // Otherwise do a COUNT in the event fetching all revisions is not desired.
233
-            $this->numRevisions = (int) $this->getRepository()->getNumRevisions($this);
233
+            $this->numRevisions = (int)$this->getRepository()->getNumRevisions($this);
234 234
         }
235 235
 
236 236
         return $this->numRevisions;
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
     {
261 261
         $content = $this->getRepository()->getPagesWikitext(
262 262
             $this->getProject(),
263
-            [ $this->getTitle() ]
263
+            [$this->getTitle()]
264 264
         );
265 265
 
266 266
         return isset($content[$this->getTitle()])
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 
418 418
         $wikidataInfo = $this->getRepository()->getWikidataInfo($this);
419 419
 
420
-        $terms = array_map(function ($entry) {
420
+        $terms = array_map(function($entry) {
421 421
             return $entry['term'];
422 422
         }, $wikidataInfo);
423 423
 
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                 'prio' => 2,
429 429
                 'name' => 'Wikidata',
430 430
                 'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
431
-                'explanation' => "See: <a target='_blank' " .
431
+                'explanation' => "See: <a target='_blank' ".
432 432
                     "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
433 433
             ];
434 434
         }
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
                 'prio' => 3,
439 439
                 'name' => 'Wikidata',
440 440
                 'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
441
-                'explanation' => "See: <a target='_blank' " .
441
+                'explanation' => "See: <a target='_blank' ".
442 442
                     "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
443 443
             ];
444 444
         }
@@ -517,8 +517,8 @@  discard block
 block discarded – undo
517 517
             return 0;
518 518
         }
519 519
 
520
-        return array_sum(array_map(function ($item) {
521
-            return (int) $item['views'];
520
+        return array_sum(array_map(function($item) {
521
+            return (int)$item['views'];
522 522
         }, $pageviews['items']));
523 523
     }
524 524
 
Please login to merge, or discard this patch.