Passed
Push — master ( 2432f8...918912 )
by Dispositif
02:37
created
src/Application/CLI/lastExternRefProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 //echo count($titles)." titles\n";
79 79
 $edited = file(__DIR__.'/../resources/article_externRef_edited.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
80 80
 $filtered = array_diff($titles, $edited);
81
-$list = new PageList( $filtered );
81
+$list = new PageList($filtered);
82 82
 echo ">".$list->count()." dans liste\n";
83 83
 
84 84
 new ExternRefWorker($botConfig, $wiki, $list, null, new InternetDomainParser());
Please login to merge, or discard this patch.
src/Infrastructure/InternetDomainParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  */
22 22
 class InternetDomainParser implements InternetDomainParserInterface
23 23
 {
24
-    private const PATH_CACHE_PUBLIC_SUFFIX_LIST = __DIR__ . '/resources/public_suffix_list.dat';
24
+    private const PATH_CACHE_PUBLIC_SUFFIX_LIST = __DIR__.'/resources/public_suffix_list.dat';
25 25
 
26 26
     private readonly Rules $rules;
27 27
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public static function extractSubdomainString(string $httpURL): string
56 56
     {
57 57
         if (!HttpUtil::isHttpURL($httpURL)) {
58
-            throw new Exception('string is not an URL ' . $httpURL);
58
+            throw new Exception('string is not an URL '.$httpURL);
59 59
         }
60 60
 
61 61
         return parse_url($httpURL, PHP_URL_HOST);
Please login to merge, or discard this patch.
src/Domain/ExternLink/DeadLinkTransformer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             $webarchive = $this->archiver->searchWebarchive($url);
44 44
             if ($webarchive instanceof WebarchiveDTO) {
45 45
                 $this->log->notice('
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
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             $this->summary->memo['sites'][] = $this->externalPage->getPrettyDomainName(); // ???
33 33
         }
34 34
         if (isset($mapData['accès url'])) {
35
-            $this->log->debug('accès 
Please login to merge, or discard this patch.
src/Domain/ExternLink/ExternPageFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@
 block discarded – undo
31 31
         ?LoggerInterface $logger = null): ExternPage
32 32
     {
33 33
         if (!HttpUtil::isHttpURL($url)) {
34
-            throw new Exception('string is not an URL ' . $url);
34
+            throw new Exception('string is not an URL '.$url);
35 35
         }
36 36
         $html = $httpClient->getHTML($url, true);
37 37
         if (empty($html)) {
38
-            throw new DomainException('No HTML from requested URL ' . $url);
38
+            throw new DomainException('No HTML from requested URL '.$url);
39 39
         }
40 40
 
41 41
         return new ExternPage($url, $html, new TagParser(), $domainParser, $logger);
Please login to merge, or discard this patch.
src/Domain/ExternLink/ExternPage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     )
55 55
     {
56 56
         if (!HttpUtil::isHttpURL($url)) {
57
-            throw new Exception('string is not an URL ' . $url);
57
+            throw new Exception('string is not an URL '.$url);
58 58
         }
59 59
         $this->url = $url;
60 60
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     {
171 171
         try {
172 172
             if (!HttpUtil::isHttpURL($this->url)) {
173
-                throw new Exception('string is not an URL ' . $this->url);
173
+                throw new Exception('string is not an URL '.$this->url);
174 174
             }
175 175
             if (!$this->domainParser instanceof InternetDomainParserInterface) {
176 176
                 $this->log->notice('InternetDomainParser is not set');
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             return $this->domainParser->getRegistrableDomainFromURL($this->url);
182 182
         } catch (Exception $e) {
183 183
             if ($this->log !== null) {
184
-                $this->log->warning('InternetDomainParser->getRegistrableDomainFromURL NULL ' . $this->url);
184
+                $this->log->warning('InternetDomainParser->getRegistrableDomainFromURL NULL '.$this->url);
185 185
             }
186 186
             throw new Exception('InternetDomainParser->getRegistrableDomainFromURL NULL', $e->getCode(), $e);
187 187
         }
Please login to merge, or discard this patch.
src/Domain/ExternLink/CheckURL.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->url = $url;
50 50
         $this->registrableDomain = null;
51 51
         if (!HttpUtil::isHttpURL($url)) {
52
-            $this->log->debug('Skip : not a valid URL : ' . $url);
52
+            $this->log->debug('Skip : not a valid URL : '.$url);
53 53
             return false;
54 54
         }
55 55
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             return false;
58 58
         }
59 59
         if (!HttpUtil::isHttpURL($url)) {
60
-            throw new Exception('string is not an URL ' . $url);
60
+            throw new Exception('string is not an URL '.$url);
61 61
         }
62 62
 
63 63
         $this->findRegistrableDomain();
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         try {
80 80
             $this->registrableDomain = $this->internetDomainParser->getRegistrableDomainFromURL($this->url);
81 81
         } catch (Exception) {
82
-            $this->log->warning('Skip : not a valid URL : ' . $this->url);
82
+            $this->log->warning('Skip : not a valid URL : '.$this->url);
83 83
             return null;
84 84
         }
85 85
         return $this->registrableDomain;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function hasForbiddenFilenameExtension(): bool
94 94
     {
95
-        return (bool)preg_match(
95
+        return (bool) preg_match(
96 96
             '#\.(pdf|jpg|jpeg|gif|png|webp|xls|xlsx|xlr|xml|xlt|txt|csv|js|docx|exe|gz|zip|ini|movie|mp3|mp4|ogg|raw|rss|tar|tgz|wma)$#i',
97 97
             $this->url
98 98
         );
Please login to merge, or discard this patch.
src/Application/ExternLink/RecentChangeWorker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 {
27 27
     protected const USER_RC_LIMIT = 100;
28 28
     protected const TASK_NAME = '
Please login to merge, or discard this patch.
src/Application/ExternLink/ExternRefWorker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public const SLEEP_AFTER_EDITION = 15; // sec
30 30
     public const MINUTES_DELAY_AFTER_LAST_HUMAN_EDIT = 10; // minutes
31 31
     public const CHECK_EDIT_CONFLICT = true;
32
-    public const ARTICLE_ANALYZED_FILENAME = __DIR__ . '/../resources/article_externRef_edited.txt';
32
+    public const ARTICLE_ANALYZED_FILENAME = __DIR__.'/../resources/article_externRef_edited.txt';
33 33
     public const SKIP_ADQ = false;
34 34
     public const SKIP_LASTEDIT_BY_BOT = false;
35 35
     public const CITATION_NUMBER_ON_FIRE = 15;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         try {
62 62
             $result = $this->transformer->process($refContent, $this->summary);
63 63
         } catch (Throwable $e) {
64
-            $this->log->critical('Error patate34 '. $e->getMessage() . " " . $e->getFile() . ":" . $e->getLine());
64
+            $this->log->critical('Error patate34 '.$e->getMessage()." ".$e->getFile().":".$e->getLine());
65 65
             // TODO : parse $e->message -> variable process, taskName, botflag...
66 66
 
67 67
             return $refContent;
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
         $prefixSummary = ($this->summary->isBotFlag()) ? 'bot ' : '';
133 133
         $suffix = '';
134 134
         if (isset($this->summary->memo['count article'])) {
135
-            $suffix .= ' ' . $this->summary->memo['count article'] . 'x {article}';
135
+            $suffix .= ' '.$this->summary->memo['count article'].'x {article}';
136 136
         }
137 137
         if (isset($this->summary->memo['count lien web'])) {
138
-            $suffix .= ' ' . $this->summary->memo['count lien web'] . 'x {lien web}';
138
+            $suffix .= ' '.$this->summary->memo['count lien web'].'x {lien web}';
139 139
         }
140 140
         if (isset($this->summary->memo['presse'])) {
141 141
             $suffix .= ' 
Please login to merge, or discard this patch.