Passed
Push — master ( dff8a4...2556d0 )
by Dispositif
08:19
created
src/Application/ExternRefWorker.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,8 +125,7 @@
 block discarded – undo
125 125
         }
126 126
         if (isset($this->summary->memo['count lien brisé'])) {
127 127
             $suffix .= ', ⚠️️️lien brisé'; //⚠️
Please login to merge, or discard this patch.
src/Application/Examples/testExternLink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     // Attention : pas de post-processing (sanitize title, etc.)
35 35
     $result = $trans->process($url, $summary);
36 36
 } catch (Exception $e) {
37
-    echo "EXCEPTION ". $e->getMessage().$e->getFile().$e->getLine();
37
+    echo "EXCEPTION ".$e->getMessage().$e->getFile().$e->getLine();
38 38
 }
39 39
 
40 40
 echo $result."\n";
Please login to merge, or discard this patch.
src/Domain/Utils/TextUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
         if (mb_strlen($text) > $maxLength) {
275 275
             $spacePos = mb_strrpos(mb_substr($text, 0, $maxLength), ' ');
276 276
             $spacePos = ($spacePos > ($maxLength - 12)) ? $spacePos : $maxLength;
277
-            $text = trim(mb_substr($text, 0, $spacePos)) . self::SYMBOL_TEXT_CUT;
277
+            $text = trim(mb_substr($text, 0, $spacePos)).self::SYMBOL_TEXT_CUT;
278 278
         }
279 279
 
280 280
         return $text;
Please login to merge, or discard this patch.
src/Domain/Publisher/SeoSanitizer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         if (empty(trim($title))) {
23 23
             return null;
24 24
         }
25
-        $title = str_replace(['–','—','\\'],['-','-','/'], $title); // replace em dash with hyphen
25
+        $title = str_replace(['–', '—', '\\'], ['-', '-', '/'], $title); // replace em dash with hyphen
26 26
 
27 27
         $seoSegments = $this->extractSEOSegments($title);
28 28
         // No SEO segmentation found
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         }
32 32
 
33 33
         // remove seo segments containing same words as the website domain name
34
-        $seoSegmentsFiltered = array_values(array_filter($seoSegments, function ($segment) use ($prettyDomainName) {
34
+        $seoSegmentsFiltered = array_values(array_filter($seoSegments, function($segment) use ($prettyDomainName) {
35 35
             // strip string after last dot in prettyDomainName : blabla.com => blabla
36 36
             $domainMain = preg_replace('/\.[^.]*$/', '', $prettyDomainName);
37 37
             // strip string if only 2 chars after dot : like in 'blabla.co.uk'
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         }
54 54
 
55 55
         // rebuild bestTitle but keep only the first 2 SEO segments
56
-        return trim($seoSegmentsFiltered[0]) . ' - ' . trim($seoSegmentsFiltered[1]);
56
+        return trim($seoSegmentsFiltered[0]).' - '.trim($seoSegmentsFiltered[1]);
57 57
     }
58 58
 
59 59
     private function extractSEOSegments(string $title): array
Please login to merge, or discard this patch.