@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | public function getRedirect(): ?string |
124 | 124 | { |
125 | 125 | if ($this->getText() && preg_match('/^#REDIRECT(?:ION)? ?\[\[([^]]+)]]/i', $this->getText(), $matches)) { |
126 | - return (string)trim($matches[1]); |
|
126 | + return (string) trim($matches[1]); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | return null; |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $parser = new TagParser(); // todo ParserFactory |
302 | 302 | $refs = $parser->importHtml($text)->getRefValues(); // [] |
303 | 303 | |
304 | - return (array)$refs; |
|
304 | + return (array) $refs; |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | /** |
@@ -472,8 +472,8 @@ |
||
472 | 472 | $this->log('°titre'); |
473 | 473 | } |
474 | 474 | |
475 | - // desactivé à cause de l'exception décrite ci-dessus |
|
476 | - // si langue=VIDE : ajout langue= à partir de langue titre |
|
475 | + // desactivé à cause de l'exception décrite ci-dessus |
|
476 | + // si langue=VIDE : ajout langue= à partir de langue titre |
|
477 | 477 | // if (self::WIKI_LANGUAGE !== $lang && empty($this->getParam('langue'))) { |
478 | 478 | // $this->setParam('langue', $lang); |
479 | 479 | // $this->log('+langue='.$lang); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | if (count($res) >= 2 && empty($auteur2)) { |
187 | 187 | // delete author-params |
188 | 188 | array_map( |
189 | - function ($param) { |
|
189 | + function($param) { |
|
190 | 190 | $this->unsetParam($param); |
191 | 191 | }, |
192 | 192 | ['auteur', 'auteurs', 'prénom1', 'nom1'] |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation |
697 | 697 | // Legacy : use {{début citation}} ... {{fin citation}} |
698 | 698 | if (preg_match('#[=|]#', $extrait) > 0) { |
699 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
699 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
700 | 700 | 'template' => 'début citation', |
701 | 701 | '1' => '', |
702 | 702 | 'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}', |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | $this->notCosmetic = true; |
706 | 706 | } else { |
707 | 707 | // StdClass |
708 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
708 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
709 | 709 | 'template' => 'citation bloc', |
710 | 710 | '1' => $extrait, |
711 | 711 | 'raw' => '{{Citation bloc|'.$extrait.'}}', |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | // "commentaire=bla" => {{Commentaire biblio|1=bla}} |
722 | 722 | if (!empty($this->getParam('commentaire'))) { |
723 | 723 | $commentaire = $this->getParam('commentaire'); |
724 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
724 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
725 | 725 | 'template' => 'commentaire biblio', |
726 | 726 | '1' => $commentaire, |
727 | 727 | 'raw' => '{{Commentaire biblio|'.$commentaire.'}}', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | ) > 0 |
30 | 30 | ) { |
31 | 31 | // FIXED zizibot : des '<nowiki>' supplémentaires ajoutés à quelques rapports |
32 | - return str_replace('<nowiki>','', $matches[1]); |
|
32 | + return str_replace('<nowiki>', '', $matches[1]); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | return null; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @return string |
57 | 57 | */ |
58 | - public function deleteAllReports(string $text, ?string $botName='ZiziBot'): string |
|
58 | + public function deleteAllReports(string $text, ?string $botName = 'ZiziBot'): string |
|
59 | 59 | { |
60 | 60 | $pattern = sprintf( |
61 | 61 | '#== Ouvrage avec erreur de paramètre ==(.*)Le robot \[\[Utilisateur:%s\|%s\]\] \(\[\[Discussion utilisateur:%s\|discuter\]\]\) [0-9a-zéà: ]+ \(CET\)[\n]*#s', |