@@ -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.'}}', |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | // { |
130 | 130 | // $value = $this->getParam($param); |
131 | 131 | // // note : strval() condition because intval('4c') = 4 |
132 | - // opti : $number can also be of type double |
|
132 | + // opti : $number can also be of type double |
|
133 | 133 | // if ($value && intval($value) > 0 && intval($value) <= 10 && strval(intval($value)) === $value) { |
134 | 134 | // $number = abs(intval($value)); |
135 | 135 | // $roman = NumberUtil::arab2roman($number); |
@@ -473,8 +473,8 @@ discard block |
||
473 | 473 | $this->log('°titre'); |
474 | 474 | } |
475 | 475 | |
476 | - // desactivé à cause de l'exception décrite ci-dessus |
|
477 | - // si langue=VIDE : ajout langue= à partir de langue titre |
|
476 | + // desactivé à cause de l'exception décrite ci-dessus |
|
477 | + // si langue=VIDE : ajout langue= à partir de langue titre |
|
478 | 478 | // if (self::WIKI_LANGUAGE !== $lang && empty($this->getParam('langue'))) { |
479 | 479 | // $this->setParam('langue', $lang); |
480 | 480 | // $this->log('+langue='.$lang); |
@@ -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', |
@@ -305,7 +305,7 @@ |
||
305 | 305 | '%s [%s/%s] %s %s : %s', |
306 | 306 | $prefix, |
307 | 307 | str_replace('v', '', $this->bot::getGitVersion()), |
308 | - str_replace(['v0.','v1.'], '', $this->citationVersion), |
|
308 | + str_replace(['v0.', 'v1.'], '', $this->citationVersion), |
|
309 | 309 | self::TASK_NAME, |
310 | 310 | $this->nbRows, |
311 | 311 | $citeSummary |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | return array_filter( |
24 | 24 | $myArray, |
25 | - function ($value) { |
|
25 | + function($value) { |
|
26 | 26 | return !is_null($value) && '' !== $value; |
27 | 27 | } |
28 | 28 | ); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $replacement = str_replace('{{extrait', '{{Citation bloc', $template); |
44 | 44 | echo ">".$replacement."\n"; |
45 | 45 | $newText = str_replace($template, $replacement, $newText); |
46 | - }else{ |
|
46 | + } else { |
|
47 | 47 | // {Début citation} et {{Fin citation}} |
48 | 48 | $replacement = str_replace('{{extrait|', '{{Début citation}}', $template.'{{Fin citation}}'); |
49 | 49 | echo ">".$replacement."\n"; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | $ask = readline("*** ÉDITION ? [y/n]"); |
61 | - if( 'y' !== $ask){ |
|
61 | + if ('y' !== $ask) { |
|
62 | 62 | continue; |
63 | 63 | } |
64 | 64 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $replacement = str_replace('{{extrait', '{{Citation bloc', $template); |
44 | 44 | echo ">".$replacement."\n"; |
45 | 45 | $newText = str_replace($template, $replacement, $newText); |
46 | - }else{ |
|
46 | + } else{ |
|
47 | 47 | // {Début citation} et {{Fin citation}} |
48 | 48 | $replacement = str_replace('{{extrait|', '{{Début citation}}', $template.'{{Fin citation}}'); |
49 | 49 | echo ">".$replacement."\n"; |