Completed
Push — master ( 75c4c9...7c1730 )
by Andrew
01:39
created
src/Modules/Extractors/ImageExtractor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
             return false;
351 351
         }
352 352
 
353
-        $regex = '@' . implode('|', $this->badFileNames) . '@i';
353
+        $regex = '@'.implode('|', $this->badFileNames).'@i';
354 354
 
355 355
         if (preg_match($regex, $imgSrc)) {
356 356
             return false;
@@ -548,10 +548,10 @@  discard block
 block discarded – undo
548 548
         $knownImage = null;
549 549
 
550 550
         foreach ($knownImgDomNames as $knownName) {
551
-            $known = $this->article()->getRawDoc()->find('#' . $knownName);
551
+            $known = $this->article()->getRawDoc()->find('#'.$knownName);
552 552
 
553 553
             if (!$known->count()) {
554
-                $known = $this->article()->getRawDoc()->find('.' . $knownName);
554
+                $known = $this->article()->getRawDoc()->find('.'.$knownName);
555 555
             }
556 556
 
557 557
             if ($known->count()) {
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
         $articleUrlParts = parse_url($this->article()->getFinalUrl());
607 607
         if (isset($imageUrlParts['path'], $articleUrlParts['path']) && $imageUrlParts['path'] && $imageUrlParts['path']{0} !== '/') {
608 608
             $articleUrlDir = dirname($articleUrlParts['path']);
609
-            $imageUrlParts['path'] = $articleUrlDir . '/' . $imageUrlParts['path'];
609
+            $imageUrlParts['path'] = $articleUrlDir.'/'.$imageUrlParts['path'];
610 610
         }
611 611
 
612 612
         foreach ($parts as $part) {
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
      */
627 627
     private function customSiteMapping() {
628 628
         if (empty(self::$CUSTOM_SITE_MAPPING)) {
629
-            $file = __DIR__ . '/../../../resources/images/known-image-css.txt';
629
+            $file = __DIR__.'/../../../resources/images/known-image-css.txt';
630 630
 
631 631
             $lines = explode("\n", str_replace(["\r\n", "\r"], "\n", file_get_contents($file)));
632 632
 
Please login to merge, or discard this patch.
src/Text/StopWords.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getWordList() {
68 68
         if (empty($this->cached)) {
69
-            $file = sprintf(__DIR__ . '/../../resources/text/stopwords-%s.txt', $this->getLanguage());
69
+            $file = sprintf(__DIR__.'/../../resources/text/stopwords-%s.txt', $this->getLanguage());
70 70
 
71 71
             $this->cached = explode("\n", str_replace(["\r\n", "\r"], "\n", file_get_contents($file)));
72 72
         }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function getCandidateWords($strippedInput) {
117 117
         // Simple separating words in Japanese.
118 118
         if ($this->getLanguage() === 'ja') {
119
-            $regexp = '/(' . implode('|', array_map('preg_quote', $this->getWordList())) . ')/';
119
+            $regexp = '/('.implode('|', array_map('preg_quote', $this->getWordList())).')/';
120 120
             $strippedInput = preg_replace($regexp, ' $1 ', $strippedInput);
121 121
         }
122 122
 
Please login to merge, or discard this patch.