Passed
Push — master ( a2b417...9e3ea7 )
by Dispositif
07:35
created
src/Application/Http/ExternHttpClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
         // idn_to_ascii('teßt.com',IDNA_NONTRANSITIONAL_TO_ASCII,INTL_IDNA_VARIANT_UTS46)
59 59
         // checkdnsrr($string, "A") // check DNS record
60 60
         if (!self::isHttpURL($url)) {
61
-            throw new DomainException('URL not compatible : ' . $url);
61
+            throw new DomainException('URL not compatible : '.$url);
62 62
         }
63 63
         $response = $this->client->get($url);
64 64
 
65 65
         if (200 !== $response->getStatusCode()) {
66
-            echo 'HTTP error ' . $response->getStatusCode();
67
-            $this->log->error('HTTP error ' . $response->getStatusCode() . ' ' . $response->getReasonPhrase());
66
+            echo 'HTTP error '.$response->getStatusCode();
67
+            $this->log->error('HTTP error '.$response->getStatusCode().' '.$response->getReasonPhrase());
68 68
 
69 69
             return null;
70 70
         }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public static function isHttpURL(string $url): bool
83 83
     {
84
-        return (bool)preg_match('#^https?://[^ ]+$#i', $url);
84
+        return (bool) preg_match('#^https?://[^ ]+$#i', $url);
85 85
     }
86 86
 
87 87
     /**
@@ -103,19 +103,19 @@  discard block
 block discarded – undo
103 103
         $charset = $this->extractCharset($html) ?? 'WINDOWS-1252';
104 104
 
105 105
         if (empty($charset)) {
106
-            throw new DomainException('normalized html error and no charset found : ' . $url);
106
+            throw new DomainException('normalized html error and no charset found : '.$url);
107 107
         }
108 108
         try {
109 109
             $html2 = iconv($charset, 'UTF-8//TRANSLIT', $html);
110 110
             if (false === $html2) {
111
-                throw new DomainException("error iconv : $charset to UTF-8 on " . $url);
111
+                throw new DomainException("error iconv : $charset to UTF-8 on ".$url);
112 112
             }
113 113
             $html2 = Normalizer::normalize($html2);
114 114
             if (!is_string($html2)) {
115
-                throw new DomainException("error normalizer : $charset to UTF-8 on " . $url);
115
+                throw new DomainException("error normalizer : $charset to UTF-8 on ".$url);
116 116
             }
117 117
         } catch (Throwable $e) {
118
-            throw new DomainException("error converting : $charset to UTF-8 on " . $url, $e->getCode(), $e);
118
+            throw new DomainException("error converting : $charset to UTF-8 on ".$url, $e->getCode(), $e);
119 119
         }
120 120
 
121 121
         return $html2;
Please login to merge, or discard this patch.
src/Domain/ExternLink/SummaryExternTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             $this->summary->memo['sites'][] = $this->externalPage->getPrettyDomainName(); // ???
34 34
         }
35 35
         if (isset($mapData['accès url'])) {
36
-            $this->log->debug('accès 
Please login to merge, or discard this patch.