Completed
Push — master ( 75c4c9...7c1730 )
by Andrew
01:39
created
src/Modules/Extractors/PublishDateExtractor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     private function getDateFromURL() {
31 31
         // Determine date based on URL
32 32
         if (preg_match('@(?:[\d]{4})(?<delimiter>[/-])(?:[\d]{2})\k<delimiter>(?:[\d]{2})@U', $this->article()->getFinalUrl(), $matches)) {
33
-            $dt = \DateTime::createFromFormat('Y' . $matches['delimiter'] . 'm' . $matches['delimiter'] . 'd', $matches[0]);
33
+            $dt = \DateTime::createFromFormat('Y'.$matches['delimiter'].'m'.$matches['delimiter'].'d', $matches[0]);
34 34
             $dt->setTime(0, 0, 0);
35 35
 
36 36
             if ($dt === false) {
Please login to merge, or discard this patch.
src/Modules/Cleaners/DocumentCleaner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         ];
166 166
 
167 167
         $exceptions = array_map(function($value) {
168
-            return ':not(' . $value . ')';
168
+            return ':not('.$value.')';
169 169
         }, $this->exceptionSelectors);
170 170
 
171 171
         $exceptions = implode('', $exceptions);
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         foreach ($lists as $expr => $list) {
174 174
             foreach ($list as $value) {
175 175
                 foreach ($attrs as $attr) {
176
-                    $selector = sprintf($expr, $attr, $value) . $exceptions;
176
+                    $selector = sprintf($expr, $attr, $value).$exceptions;
177 177
 
178 178
                     foreach ($this->document()->find($selector) as $node) {
179 179
                         $node->remove();
Please login to merge, or discard this patch.
src/Images/LocallyStoredImage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function __construct($options = []) {
16 16
         foreach ($options as $key => $value) {
17
-            $method = 'set' . ucfirst($key);
17
+            $method = 'set'.ucfirst($key);
18 18
 
19 19
             if (method_exists($this, $method)) {
20 20
                 call_user_func([$this, $method], $value);
Please login to merge, or discard this patch.
src/Utils/Helper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
         $parts = parse_url($urlToCrawl);
23 23
 
24 24
         if ($parts === false) {
25
-            throw new MalformedURLException($urlToCrawl . ' - is a malformed URL and cannot be processed');
25
+            throw new MalformedURLException($urlToCrawl.' - is a malformed URL and cannot be processed');
26 26
         }
27 27
 
28 28
         $prefix = isset($parts['query']) && $parts['query'] ? '&' : '?';
29 29
 
30
-        $finalUrl = str_replace('#!', $prefix . '_escaped_fragment_=', $urlToCrawl);
30
+        $finalUrl = str_replace('#!', $prefix.'_escaped_fragment_=', $urlToCrawl);
31 31
 
32 32
         return (object)[
33 33
             'url' => $urlToCrawl,
Please login to merge, or discard this patch.
src/Modules/Extractors/MetaExtractor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
         // Additionally retrieve type values based on provided og:type (http://ogp.me/#types)
62 62
         if (isset($results['type'])) {
63
-            $nodes = $this->article()->getDoc()->find('meta[property^="' . $results['type'] .':"]');
63
+            $nodes = $this->article()->getDoc()->find('meta[property^="'.$results['type'].':"]');
64 64
 
65 65
             foreach ($nodes as $node) {
66 66
                 $property = explode(':', $node->attr('property'));
Please login to merge, or discard this patch.
src/Images/Image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function __construct($options = []) {
16 16
         foreach ($options as $key => $value) {
17
-            $method = 'set' . ucfirst($key);
17
+            $method = 'set'.ucfirst($key);
18 18
 
19 19
             if (method_exists($this, $method)) {
20 20
                 call_user_func([$this, $method], $value);
Please login to merge, or discard this patch.
src/Text/WordStats.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function __construct($options = []) {
16 16
         foreach ($options as $key => $value) {
17
-            $method = 'set' . ucfirst($key);
17
+            $method = 'set'.ucfirst($key);
18 18
 
19 19
             if (method_exists($this, $method)) {
20 20
                 call_user_func([$this, $method], $value);
Please login to merge, or discard this patch.
src/Modules/Formatters/OutputFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
             $headers = $topNode->find('h1, h2, h3, h4, h5, h6');
166 166
 
167 167
             foreach ($headers as $header) {
168
-                $header->replaceWith(new Text("\n\n" . $this->getTagCleanedText($header) . "\n\n"));
168
+                $header->replaceWith(new Text("\n\n".$this->getTagCleanedText($header)."\n\n"));
169 169
             }
170 170
         }
171 171
     }
Please login to merge, or discard this patch.
src/Modules/Extractors/AdditionalDataExtractor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.