@@ -63,7 +63,7 @@ |
||
63 | 63 | if ($webarchiveDTO->getArchiver() === '[[Internet Archive]]') { |
64 | 64 | $this->log->notice(' |
@@ -32,7 +32,7 @@ |
||
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 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | final public const BASE_URL = 'https://fr.wikipedia.org/w/api.php'; |
34 | 34 | public const NAMESPACE_MAIN = 0; |
35 | - private const SEARCH_CONTINUE_FILENAME = __DIR__ . '/../../resources/cirrusSearch-HASH.txt'; // move to config |
|
35 | + private const SEARCH_CONTINUE_FILENAME = __DIR__.'/../../resources/cirrusSearch-HASH.txt'; // move to config |
|
36 | 36 | /** |
37 | 37 | * @var array|string[] |
38 | 38 | */ |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | { |
68 | 68 | $arrayResp = $this->httpRequest(); |
69 | 69 | |
70 | - if (($this->options['continue'] ?? false) && (!empty($arrayResp['continue']['sroffset']))) { |
|
70 | + if (($this->options['continue'] ?? false) && (!empty($arrayResp['continue']['sroffset']))) { |
|
71 | 71 | $continueOffset = (int) $arrayResp['continue']['sroffset']; |
72 | 72 | $this->saveOffsetInFile($continueOffset); |
73 | 73 | } |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | public const SLEEP_AFTER_EDITION = 60; |
33 | 33 | public const MINUTES_DELAY_AFTER_LAST_HUMAN_EDIT = 15; |
34 | 34 | public const CHECK_EDIT_CONFLICT = true; |
35 | - public const ARTICLE_ANALYZED_FILENAME = __DIR__ . '/resources/article_edited.txt'; |
|
35 | + public const ARTICLE_ANALYZED_FILENAME = __DIR__.'/resources/article_edited.txt'; |
|
36 | 36 | public const SKIP_LASTEDIT_BY_BOT = true; |
37 | 37 | public const SKIP_NOT_IN_MAIN_WIKISPACE = true; |
38 | 38 | public const SKIP_ADQ = true; |
39 | 39 | public const THROTTLE_DELAY_AFTER_EACH_TITLE = 1; //secs |
40 | - protected const GIT_COMMIT_HASH_PATH = __DIR__ . '/resources/commithash.txt'; |
|
40 | + protected const GIT_COMMIT_HASH_PATH = __DIR__.'/resources/commithash.txt'; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @var PageListInterface |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $this->initializePastAnalyzedTitles(); |
94 | 94 | |
95 | 95 | // @throw exception on "Invalid CSRF token" |
96 | - $this->run();//todo delete that and use (Worker)->run($duration) or process management |
|
96 | + $this->run(); //todo delete that and use (Worker)->run($duration) or process management |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | final public function run(): void |
105 | 105 | { |
106 | 106 | $this->log->notice('*** '.date('Y-m-d H:i') |
107 | - .' New BotTaskWorker: ' . $this->defaultTaskname, ['stats' => 'bottaskworker.instance']); |
|
107 | + .' New BotTaskWorker: '.$this->defaultTaskname, ['stats' => 'bottaskworker.instance']); |
|
108 | 108 | $this->log->notice(sprintf( |
109 | 109 | '*** Bot: %s - commit: %s', |
110 | 110 | $this->bot::getBotName(), |
111 | 111 | $this->bot->getCurrentGitCommitHash() ?? '??' |
112 | 112 | )); |
113 | - $this->log->notice('*** Stats: ' . $this->log->stats::class); |
|
113 | + $this->log->notice('*** Stats: '.$this->log->stats::class); |
|
114 | 114 | |
115 | 115 | foreach ($this->getTitles() as $title) { |
116 | 116 | try { |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | |
221 | 221 | $this->log->notice($result ? '>> OK' : '>> NOCHANGE'); |
222 | - $this->log->debug("Sleep " . static::SLEEP_AFTER_EDITION); |
|
222 | + $this->log->debug("Sleep ".static::SLEEP_AFTER_EDITION); |
|
223 | 223 | sleep(static::SLEEP_AFTER_EDITION); |
224 | 224 | } |
225 | 225 |
@@ -60,13 +60,13 @@ |
||
60 | 60 | $list = new PageList([trim($options['page'])]); |
61 | 61 | |
62 | 62 | // delete Title from edited.txt |
63 | - $file = __DIR__ . '/../resources/article_externRef_edited.txt'; |
|
63 | + $file = __DIR__.'/../resources/article_externRef_edited.txt'; |
|
64 | 64 | $text = file_get_contents($file); |
65 | - $newText = str_replace(trim($argv[1]) . "\n", '', $text); |
|
65 | + $newText = str_replace(trim($argv[1])."\n", '', $text); |
|
66 | 66 | if (!empty($text) && $text !== $newText) { |
67 | 67 | @file_put_contents($file, $newText); |
68 | 68 | } |
69 | - $botConfig->setTaskName(' |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public const SLEEP_AFTER_EDITION = 5; // sec |
29 | 29 | public const MINUTES_DELAY_AFTER_LAST_HUMAN_EDIT = 10; // minutes |
30 | 30 | public const CHECK_EDIT_CONFLICT = true; |
31 | - public const ARTICLE_ANALYZED_FILENAME = __DIR__ . '/../resources/article_externRef_edited.txt'; |
|
31 | + public const ARTICLE_ANALYZED_FILENAME = __DIR__.'/../resources/article_externRef_edited.txt'; |
|
32 | 32 | public const SKIP_ADQ = false; |
33 | 33 | public const SKIP_LASTEDIT_BY_BOT = false; |
34 | 34 | public const CITATION_NUMBER_ON_FIRE = 15; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $result = $this->transformer->process($refContent, $this->summary); |
78 | 78 | } catch (Throwable $e) { |
79 | 79 | $this->log->critical( |
80 | - 'Error patate34 ' . $e->getMessage() . " " . $e->getFile() . ":" . $e->getLine(), |
|
80 | + 'Error patate34 '.$e->getMessage()." ".$e->getFile().":".$e->getLine(), |
|
81 | 81 | ['stats' => 'externref.exception.patate34'] |
82 | 82 | ); |
83 | 83 | // TODO : parse $e->message -> variable process, taskName, botflag... |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | $suffix = ''; |
145 | 145 | if (isset($this->summary->memo['count article'])) { |
146 | 146 | $this->log->stats->increment('externref.count.article'); |
147 | - $suffix .= ' ' . $this->summary->memo['count article'] . 'x {article}'; |
|
147 | + $suffix .= ' '.$this->summary->memo['count article'].'x {article}'; |
|
148 | 148 | } |
149 | 149 | if (isset($this->summary->memo['count lien web'])) { |
150 | 150 | $this->log->stats->increment('externref.count.lienweb'); |
151 | - $suffix .= ' ' . $this->summary->memo['count lien web'] . 'x {lien web}'; |
|
151 | + $suffix .= ' '.$this->summary->memo['count lien web'].'x {lien web}'; |
|
152 | 152 | } |
153 | 153 | if (isset($this->summary->memo['presse'])) { |
154 | 154 | $this->log->stats->increment('externref.count.presse'); |
@@ -162,20 +162,20 @@ discard block |
||
162 | 162 | $this->log->stats->increment('externref.count.lienbrisé'); |
163 | 163 | $suffix .= ' ⚠️️️lien brisé'; //⚠️ |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | protected const USER_RC_LIMIT = 100; |
33 | 33 | protected const TASK_NAME = ' |