Test Failed
Push — largest-pages ( ac84ba )
by MusikAnimal
07:45
created
src/AppBundle/Model/Edit.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the Edit class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public static function getEditsFromRevs(Project $project, User $user, array $revs): array
88 88
     {
89
-        return array_map(function ($rev) use ($project, $user) {
89
+        return array_map(function($rev) use ($project, $user) {
90 90
             /** @var Page $page Page object to be passed to the Edit constructor. */
91 91
             $page = Page::newFromRow($project, $rev);
92 92
             $rev['user'] = $user;
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
         $isSection = preg_match_all("/^\/\* (.*?) \*\//", $summary, $sectionMatch);
309 309
 
310 310
         if ($isSection && isset($page)) {
311
-            $pageUrl = $project->getUrl(false) . str_replace(
311
+            $pageUrl = $project->getUrl(false).str_replace(
312 312
                 '$1',
313 313
                 $page->getTitle($useUnnormalizedPageTitle),
314 314
                 $project->getArticlePath()
@@ -318,8 +318,8 @@  discard block
 block discarded – undo
318 318
             // Must have underscores for the link to properly go to the section.
319 319
             $sectionTitleLink = htmlspecialchars(str_replace(' ', '_', $sectionTitle));
320 320
 
321
-            $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>" .
322
-                "<em class='text-muted'>" . htmlspecialchars($sectionTitle) . ":</em> ";
321
+            $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>".
322
+                "<em class='text-muted'>".htmlspecialchars($sectionTitle).":</em> ";
323 323
             $summary = str_replace($sectionMatch[0][0], $sectionWikitext, $summary);
324 324
         }
325 325
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             );
334 334
 
335 335
             // Use normalized page title (underscored, capitalized).
336
-            $pageUrl = $project->getUrl(false) . str_replace(
336
+            $pageUrl = $project->getUrl(false).str_replace(
337 337
                 '$1',
338 338
                 ucfirst(str_replace(' ', '_', $wikiLinkPath)),
339 339
                 $project->getArticlePath()
@@ -371,8 +371,8 @@  discard block
 block discarded – undo
371 371
     public function getDiffUrl(): string
372 372
     {
373 373
         $project = $this->getProject();
374
-        $path = str_replace('$1', 'Special:Diff/' . $this->id, $project->getArticlePath());
375
-        return rtrim($project->getUrl(), '/') . $path;
374
+        $path = str_replace('$1', 'Special:Diff/'.$this->id, $project->getArticlePath());
375
+        return rtrim($project->getUrl(), '/').$path;
376 376
     }
377 377
 
378 378
     /**
@@ -382,8 +382,8 @@  discard block
 block discarded – undo
382 382
     public function getPermaUrl(): string
383 383
     {
384 384
         $project = $this->getProject();
385
-        $path = str_replace('$1', 'Special:PermaLink/' . $this->id, $project->getArticlePath());
386
-        return rtrim($project->getUrl(), '/') . $path;
385
+        $path = str_replace('$1', 'Special:PermaLink/'.$this->id, $project->getArticlePath());
386
+        return rtrim($project->getUrl(), '/').$path;
387 387
     }
388 388
 
389 389
     /**
Please login to merge, or discard this patch.
src/AppBundle/Model/LargestPages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/LargestPagesRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace AppBundle\Repository;
5 5
 
Please login to merge, or discard this patch.
src/AppBundle/Controller/LargestPagesController.php 1 patch
Spacing   +2 added lines, -2 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\Controller;
5 5
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $pages = [];
129 129
         foreach ($lp->getResults() as $index => $page) {
130 130
             $pages[] = [
131
-                'rank' => $index + 1,
131
+                'rank' => $index+1,
132 132
                 'page_title' => $page->getTitle(true),
133 133
                 'length' => $page->getLength(),
134 134
             ];
Please login to merge, or discard this patch.