Passed
Push — v4 ( 4ea8ea...032521 )
by Andrew
24:07 queued 14s
created
src/helpers/Text.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         if (!empty($string)) {
76 76
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
77 77
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
78
-            $result = (string)Stringy::create($string)->truncate($length, $substring);
78
+            $result = (string) Stringy::create($string)->truncate($length, $substring);
79 79
         }
80 80
 
81 81
         return $result;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         if (!empty($string)) {
101 101
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
102 102
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
103
-            $result = (string)Stringy::create($string)->safeTruncate($length, $substring);
103
+            $result = (string) Stringy::create($string)->safeTruncate($length, $substring);
104 104
         }
105 105
 
106 106
         return $result;
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
             $result = self::smartStripTags(Doxter::$plugin->getService()->parseMarkdown($field->getRaw()));
135 135
         } else {
136 136
             if (self::isArrayLike($field)) {
137
-                $result = self::smartStripTags((string)$field[0]);
137
+                $result = self::smartStripTags((string) $field[0]);
138 138
             } else {
139
-                $result = self::smartStripTags((string)$field);
139
+                $result = self::smartStripTags((string) $field);
140 140
             }
141 141
         }
142 142
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             $tags = $tags->all();
164 164
         }
165 165
         foreach ($tags as $tag) {
166
-            $result .= $tag->title . ', ';
166
+            $result .= $tag->title.', ';
167 167
         }
168 168
         $result = rtrim($result, ', ');
169 169
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                     foreach ($fieldClasses as $fieldClassKey) {
206 206
                         if ($field instanceof $fieldClassKey) {
207 207
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
208
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
208
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
209 209
                             }
210 210
                         }
211 211
                     }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
                     foreach ($fieldClasses as $fieldClassKey) {
248 248
                         if ($field instanceof $fieldClassKey) {
249 249
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
250
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
250
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
251 251
                             }
252 252
                         }
253 253
                     }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                     foreach ($fieldClasses as $fieldClassKey) {
298 298
                         if ($field instanceof $fieldClassKey) {
299 299
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
300
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
300
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
301 301
                             }
302 302
                         }
303 303
                     }
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
397 397
         $str = rawurldecode($str);
398 398
         // Remove any linebreaks
399
-        $str = (string)preg_replace("/\r|\n/", "", $str);
399
+        $str = (string) preg_replace("/\r|\n/", "", $str);
400 400
         $str = HtmlPurifier::process($str, ['HTML.Allowed' => '']);
401 401
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
402 402
         // Remove any embedded Twig code
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             $language = 'English';
488 488
         }
489 489
 
490
-        $className = 'PhpScience\\TextRank\\Tool\\StopWords\\' . ucfirst($language);
490
+        $className = 'PhpScience\\TextRank\\Tool\\StopWords\\'.ucfirst($language);
491 491
         if (class_exists($className)) {
492 492
             $stopWords = new $className();
493 493
         }
Please login to merge, or discard this patch.