@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $this->url = $url; |
45 | 45 | $this->registrableDomain = null; |
46 | 46 | if (!ExternHttpClient::isHttpURL($url)) { |
47 | - $this->log->debug('Skip : not a valid URL : ' . $url); |
|
47 | + $this->log->debug('Skip : not a valid URL : '.$url); |
|
48 | 48 | return false; |
49 | 49 | } |
50 | 50 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | return false; |
53 | 53 | } |
54 | 54 | if (!ExternHttpClient::isHttpURL($url)) { |
55 | - throw new Exception('string is not an URL ' . $url); |
|
55 | + throw new Exception('string is not an URL '.$url); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | $this->findRegistrableDomain(); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | try { |
75 | 75 | $this->registrableDomain = (new InternetDomainParser())->getRegistrableDomainFromURL($this->url); |
76 | 76 | } catch (Exception $e) { |
77 | - $this->log->warning('Skip : not a valid URL : ' . $this->url); |
|
77 | + $this->log->warning('Skip : not a valid URL : '.$this->url); |
|
78 | 78 | return null; |
79 | 79 | } |
80 | 80 | return $this->registrableDomain; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | protected function hasForbiddenFilenameExtension(): bool |
93 | 93 | { |
94 | - return (bool)preg_match( |
|
94 | + return (bool) preg_match( |
|
95 | 95 | '#\.(pdf|jpg|jpeg|gif|png|xls|xlsx|xlr|xml|xlt|txt|csv|js|docx|exe|gz|zip|ini|movie|mp3|mp4|ogg|raw|rss|tar|tgz|wma)$#i', |
96 | 96 | $this->url |
97 | 97 | ); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public const SLEEP_AFTER_EDITION = 15; // sec |
26 | 26 | public const MINUTES_DELAY_AFTER_LAST_HUMAN_EDIT = 10; // minutes |
27 | 27 | public const CHECK_EDIT_CONFLICT = true; |
28 | - public const ARTICLE_ANALYZED_FILENAME = __DIR__ . '/resources/article_externRef_edited.txt'; |
|
28 | + public const ARTICLE_ANALYZED_FILENAME = __DIR__.'/resources/article_externRef_edited.txt'; |
|
29 | 29 | public const SKIP_ADQ = false; |
30 | 30 | public const SKIP_LASTEDIT_BY_BOT = false; |
31 | 31 | public const CITATION_NUMBER_ON_FIRE = 15; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $result = $this->transformer->process($refContent, $this->summary); |
73 | 73 | } catch (Throwable $e) { |
74 | 74 | echo "** Problème détecté 234242\n"; |
75 | - $this->log->critical($e->getMessage() . " " . $e->getFile() . ":" . $e->getLine()); |
|
75 | + $this->log->critical($e->getMessage()." ".$e->getFile().":".$e->getLine()); |
|
76 | 76 | |
77 | 77 | // TODO : parse $e->message pour traitement, taskName, botflag... |
78 | 78 | return $refContent; |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | |
85 | 85 | // Gestion semi-auto : todo CONDITION POURRI FAUSSE $this->transformer->skipUnauthorised |
86 | 86 | |
87 | - echo Color::BG_LIGHT_RED . "--" . Color::NORMAL . " " . $refContent . "\n"; |
|
88 | - echo Color::BG_LIGHT_GREEN . "++" . Color::NORMAL . " $result \n\n"; |
|
87 | + echo Color::BG_LIGHT_RED."--".Color::NORMAL." ".$refContent."\n"; |
|
88 | + echo Color::BG_LIGHT_GREEN."++".Color::NORMAL." $result \n\n"; |
|
89 | 89 | |
90 | 90 | if (!$this->autoOrYesConfirmation('Conserver cette modif ?')) { |
91 | 91 | return $refContent; |
@@ -116,10 +116,10 @@ discard block |
||
116 | 116 | $prefixSummary = ($this->summary->isBotFlag()) ? 'bot ' : ''; |
117 | 117 | $suffix = ''; |
118 | 118 | if (isset($this->summary->memo['count article'])) { |
119 | - $suffix .= ' ' . $this->summary->memo['count article'] . 'x {article}'; |
|
119 | + $suffix .= ' '.$this->summary->memo['count article'].'x {article}'; |
|
120 | 120 | } |
121 | 121 | if (isset($this->summary->memo['count lien web'])) { |
122 | - $suffix .= ' ' . $this->summary->memo['count lien web'] . 'x {lien web}'; |
|
122 | + $suffix .= ' '.$this->summary->memo['count lien web'].'x {lien web}'; |
|
123 | 123 | } |
124 | 124 | if (isset($this->summary->memo['presse'])) { |
125 | 125 | $suffix .= ' |