@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $srcHost = parse_url($src, PHP_URL_HOST); |
88 | 88 | $srcScheme = parse_url($src, PHP_URL_SCHEME); |
89 | 89 | |
90 | - return $match || preg_match('@' . $domain . '$@i', $srcHost) && in_array($srcScheme, ['http', 'https']); |
|
90 | + return $match || preg_match('@'.$domain.'$@i', $srcHost) && in_array($srcScheme, ['http', 'https']); |
|
91 | 91 | }); |
92 | 92 | |
93 | 93 | if ($match) { |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | $stopWords = $this->config()->getStopWords()->getCurrentStopWords(); |
135 | 135 | |
136 | 136 | $text = $this->article()->getTitle(); |
137 | - $text .= ' ' . $this->article()->getMetaDescription(); |
|
137 | + $text .= ' '.$this->article()->getMetaDescription(); |
|
138 | 138 | |
139 | 139 | if ($this->article()->getTopNode()) { |
140 | - $text .= ' ' . $this->article()->getCleanedArticleText(); |
|
140 | + $text .= ' '.$this->article()->getCleanedArticleText(); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | // Decode and split words by white-space |
@@ -350,7 +350,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |