@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | |
60 | 60 | // utilise une liste d'import wstat.fr |
61 | - echo "Liste d'après wstat.fr\n"; |
|
61 | + echo "Liste d'après wstat.fr\n"; |
|
62 | 62 | $list = PageList::FromFile(__DIR__.'/../resources/importISBN_nov.txt'); |
63 | 63 | new ScanWiki2DB($wiki, new DbAdapter(), new WikiBotConfig(), $list, 0); |
64 | 64 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | const EDIT_SIGNALEMENT = true; |
40 | 40 | |
41 | - const CITATION_LIMIT = 150; |
|
41 | + const CITATION_LIMIT = 150; |
|
42 | 42 | const DELAY_BOTFLAG_SECONDS = 120; |
43 | 43 | const DELAY_NO_BOTFLAG_SECONDS = 120; |
44 | 44 | const ERROR_MSG_TEMPLATE = __DIR__.'/templates/message_errors.wiki'; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | // Page supprimée ? |
131 | - if($page->getLastRevision() === null) { |
|
131 | + if ($page->getLastRevision() === null) { |
|
132 | 132 | $this->log->warning("SKIP : page supprimée !\n"); |
133 | 133 | $this->db->deleteArticle($title); |
134 | 134 |
@@ -111,7 +111,7 @@ |
||
111 | 111 | $this->processSpecialActions($notif); |
112 | 112 | } |
113 | 113 | |
114 | - if(empty($wikilog)) { |
|
114 | + if (empty($wikilog)) { |
|
115 | 115 | echo "Nothing."; |
116 | 116 | return; |
117 | 117 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | throw new ConfigException('Pas de phrases disponibles'); |
103 | 103 | } |
104 | 104 | |
105 | - return (string)trim($sentences[array_rand($sentences)]); |
|
105 | + return (string) trim($sentences[array_rand($sentences)]); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | private function generateVoteInsertionText(): ?string |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $html = $this->getAdminScoreHtml(); |
258 | 258 | |
259 | 259 | if (!empty($html) && preg_match('#<th>Total</th>[^<]*<th>([0-9]+)</th>#', $html, $matches)) { |
260 | - return (int)$matches[1]; |
|
260 | + return (int) $matches[1]; |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | return null; |
@@ -71,7 +71,7 @@ |
||
71 | 71 | return null; |
72 | 72 | } |
73 | 73 | |
74 | - $html = (string)$response->getBody()->getContents() ?? ''; |
|
74 | + $html = (string) $response->getBody()->getContents() ?? ''; |
|
75 | 75 | |
76 | 76 | return ($normalized) ? $this->normalizeHtml($html, $url) : $html; |
77 | 77 | } |
@@ -122,8 +122,7 @@ |
||
122 | 122 | } |
123 | 123 | if (isset($this->summary->memo['count lien brisé'])) { |
124 | 124 | $suffix .= ', ⚠️️️lien brisé'; //⚠️ |
@@ -228,9 +228,9 @@ discard block |
||
228 | 228 | */ |
229 | 229 | public function minutesSinceLastEdit(string $title): int |
230 | 230 | { |
231 | - $time = $this->getTimestamp($title); // 2011-09-02T16:31:13Z |
|
231 | + $time = $this->getTimestamp($title); // 2011-09-02T16:31:13Z |
|
232 | 232 | |
233 | - return (int)round((time() - strtotime($time)) / 60); |
|
233 | + return (int) round((time() - strtotime($time)) / 60); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |
@@ -246,8 +246,7 @@ discard block |
||
246 | 246 | { |
247 | 247 | $text = WikiTextUtil::removeHTMLcomments($text); |
248 | 248 | $botName = ($botName) ? $botName : getenv('BOT_NAME'); |
249 | - $denyReg = (!empty($botName)) ? '|\{\{bots ?\| ?(optout|deny)\=[^\}]*'.preg_quote($botName, '#').'[^\}]*\}\}' : |
|
250 | - ''; |
|
249 | + $denyReg = (!empty($botName)) ? '|\{\{bots ?\| ?(optout|deny)\=[^\}]*'.preg_quote($botName, '#').'[^\}]*\}\}' : ''; |
|
251 | 250 | |
252 | 251 | if (preg_match('#({{nobots}}|{{bots ?\| ?(optout|deny) ?= ?all ?}}'.$denyReg.')#i', $text) > 0) { |
253 | 252 | return true; |