Completed
Pull Request — master (#81)
by MusikAnimal
03:21
created
src/Xtools/Page.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $info = $this->getPageInfo();
67 67
         $title = isset($info['title']) ? $info['title'] : $this->unnormalizedPageName;
68 68
         $nsName = $this->getNamespaceName();
69
-        return str_replace(empty($nsName) ? '' : $nsName . ':', '', $title);
69
+        return str_replace(empty($nsName) ? '' : $nsName.':', '', $title);
70 70
     }
71 71
 
72 72
     /**
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
         // Otherwise do a COUNT in the event fetching
209 209
         // all revisions is not desired
210
-        return (int) $this->getRepository()->getNumRevisions($this, $user);
210
+        return (int)$this->getRepository()->getNumRevisions($this, $user);
211 211
     }
212 212
 
213 213
     /**
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
         $wikidataInfo = $this->getRepository()->getWikidataInfo($this);
367 367
 
368
-        $terms = array_map(function ($entry) {
368
+        $terms = array_map(function($entry) {
369 369
             return $entry['term'];
370 370
         }, $wikidataInfo);
371 371
 
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                 'prio' => 2,
377 377
                 'name' => 'Wikidata',
378 378
                 'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
379
-                'explanation' => "See: <a target='_blank' " .
379
+                'explanation' => "See: <a target='_blank' ".
380 380
                     "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
381 381
             ];
382 382
         }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
                 'prio' => 3,
387 387
                 'name' => 'Wikidata',
388 388
                 'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
389
-                'explanation' => "See: <a target='_blank' " .
389
+                'explanation' => "See: <a target='_blank' ".
390 390
                     "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
391 391
             ];
392 392
         }
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
             return 0;
458 458
         }
459 459
 
460
-        return array_sum(array_map(function ($item) {
461
-            return (int) $item['views'];
460
+        return array_sum(array_map(function($item) {
461
+            return (int)$item['views'];
462 462
         }, $pageviews['items']));
463 463
     }
464 464
 
Please login to merge, or discard this patch.