Passed
Push — master ( adfd7e...44ff32 )
by Dispositif
02:19
created
src/Application/ExternRefWorker.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,8 +126,7 @@
 block discarded – undo
126 126
         }
127 127
         if (isset($this->summary->memo['count lien brisé'])) {
128 128
             $suffix .= ', ⚠️️️lien brisé'; //⚠️
Please login to merge, or discard this patch.
src/Application/Http/ExternHttpClient.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,20 +61,20 @@  discard block
 block discarded – undo
61 61
         // idn_to_ascii('teßt.com',IDNA_NONTRANSITIONAL_TO_ASCII,INTL_IDNA_VARIANT_UTS46)
62 62
         // checkdnsrr($string, "A") // check DNS record
63 63
         if (!self::isHttpURL($url)) {
64
-            throw new DomainException('URL not compatible : ' . $url);
64
+            throw new DomainException('URL not compatible : '.$url);
65 65
         }
66 66
         $response = $this->client->get($url);
67 67
 
68 68
         if (200 !== $response->getStatusCode()) {
69
-            echo 'HTTP error ' . $response->getStatusCode();
69
+            echo 'HTTP error '.$response->getStatusCode();
70 70
             if ($this->log !== null) {
71
-                $this->log->error('HTTP error ' . $response->getStatusCode() . ' ' . $response->getReasonPhrase());
71
+                $this->log->error('HTTP error '.$response->getStatusCode().' '.$response->getReasonPhrase());
72 72
             }
73 73
 
74 74
             return null;
75 75
         }
76 76
 
77
-        $html = (string)$response->getBody()->getContents() ?? '';
77
+        $html = (string) $response->getBody()->getContents() ?? '';
78 78
 
79 79
         return ($normalized) ? $this->normalizeHtml($html, $url) : $html;
80 80
     }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public static function isHttpURL(string $url): bool
87 87
     {
88
-        return (bool)preg_match('#^https?://[^ ]+$#i', $url);
88
+        return (bool) preg_match('#^https?://[^ ]+$#i', $url);
89 89
     }
90 90
 
91 91
     /**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $charset = $this->extractCharset($html) ?? 'WINDOWS-1252';
113 113
 
114 114
         if (empty($charset)) {
115
-            throw new DomainException('normalized html error and no charset found : ' . $url);
115
+            throw new DomainException('normalized html error and no charset found : '.$url);
116 116
         }
117 117
         try {
118 118
             $html2 = iconv($charset, 'UTF-8//TRANSLIT', $html);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 return '';
122 122
             }
123 123
         } catch (Throwable $e) {
124
-            throw new DomainException("error converting : $charset to UTF-8 on " . $url, $e->getCode(), $e);
124
+            throw new DomainException("error converting : $charset to UTF-8 on ".$url, $e->getCode(), $e);
125 125
         }
126 126
 
127 127
         return $html2;
Please login to merge, or discard this patch.