Completed
Pull Request — master (#142)
by MusikAnimal
09:54 queued 58s
created
src/Xtools/Edit.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->page = $page;
50 50
 
51 51
         // Copy over supported attributes
52
-        $this->id = (int) $attrs['id'];
52
+        $this->id = (int)$attrs['id'];
53 53
 
54 54
         // Allow DateTime or string (latter assumed to be of format YmdHis)
55 55
         if ($attrs['timestamp'] instanceof DateTime) {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $isSection = preg_match_all("/^\/\* (.*?) \*\//", $summary, $sectionMatch);
238 238
 
239 239
         if ($isSection && isset($page)) {
240
-            $pageUrl = $project->getUrl(false) . str_replace(
240
+            $pageUrl = $project->getUrl(false).str_replace(
241 241
                 '$1',
242 242
                 $page->getTitle($useUnnormalizedPageTitle),
243 243
                 $project->getArticlePath()
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
             // Must have underscores for the link to properly go to the section.
248 248
             $sectionTitleLink = htmlspecialchars(str_replace(' ', '_', $sectionTitle));
249 249
 
250
-            $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>" .
251
-                "<em class='text-muted'>" . htmlspecialchars($sectionTitle) . ":</em> ";
250
+            $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>".
251
+                "<em class='text-muted'>".htmlspecialchars($sectionTitle).":</em> ";
252 252
             $summary = str_replace($sectionMatch[0][0], $sectionWikitext, $summary);
253 253
         }
254 254
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             );
263 263
 
264 264
             // Use normalized page title (underscored, capitalized).
265
-            $pageUrl = $project->getUrl(false) . str_replace(
265
+            $pageUrl = $project->getUrl(false).str_replace(
266 266
                 '$1',
267 267
                 ucfirst(str_replace(' ', '_', $wikiLinkPath)),
268 268
                 $project->getArticlePath()
@@ -300,8 +300,8 @@  discard block
 block discarded – undo
300 300
     public function getDiffUrl()
301 301
     {
302 302
         $project = $this->getProject();
303
-        $path = str_replace('$1', 'Special:Diff/' . $this->id, $project->getArticlePath());
304
-        return rtrim($project->getUrl(), '/') . $path;
303
+        $path = str_replace('$1', 'Special:Diff/'.$this->id, $project->getArticlePath());
304
+        return rtrim($project->getUrl(), '/').$path;
305 305
     }
306 306
 
307 307
     /**
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
     public function getPermaUrl()
312 312
     {
313 313
         $project = $this->getProject();
314
-        $path = str_replace('$1', 'Special:PermaLink/' . $this->id, $project->getArticlePath());
315
-        return rtrim($project->getUrl(), '/') . $path;
314
+        $path = str_replace('$1', 'Special:PermaLink/'.$this->id, $project->getArticlePath());
315
+        return rtrim($project->getUrl(), '/').$path;
316 316
     }
317 317
 
318 318
     /**
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
      */
345 345
     public function isAutomated(Container $container)
346 346
     {
347
-        return (bool) $this->getTool($container);
347
+        return (bool)$this->getTool($container);
348 348
     }
349 349
 
350 350
     /**
Please login to merge, or discard this patch.