@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | // todo verify/useless ? |
| 100 | 100 | if (is_int($name)) { |
| 101 | - $name = (string)$name; |
|
| 101 | + $name = (string) $name; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // that parameter exists in template ? |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | } catch (Throwable $e) { |
| 238 | 238 | unset($e); |
| 239 | 239 | // hack : 1 => "ouvrage collectif" |
| 240 | - $name = (string)$name; |
|
| 240 | + $name = (string) $name; |
|
| 241 | 241 | $this->log[] = "parameter $name not found"; |
| 242 | 242 | $this->parametersErrorFromHydrate[$name] = $value; |
| 243 | 243 | |
@@ -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'] |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation |
| 724 | 724 | // Legacy : use {{début citation}} ... {{fin citation}} |
| 725 | 725 | if (preg_match('#[=|]#', $extrait) > 0) { |
| 726 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
| 726 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
| 727 | 727 | 'template' => 'début citation', |
| 728 | 728 | '1' => '', |
| 729 | 729 | 'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}', |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | $this->notCosmetic = true; |
| 733 | 733 | } else { |
| 734 | 734 | // StdClass |
| 735 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
| 735 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
| 736 | 736 | 'template' => 'citation bloc', |
| 737 | 737 | '1' => $extrait, |
| 738 | 738 | 'raw' => '{{Citation bloc|'.$extrait.'}}', |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | // "commentaire=bla" => {{Commentaire biblio|1=bla}} |
| 749 | 749 | if ($this->hasParamValue('commentaire')) { |
| 750 | 750 | $commentaire = $this->getParam('commentaire'); |
| 751 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
| 751 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
| 752 | 752 | 'template' => 'commentaire biblio', |
| 753 | 753 | '1' => $commentaire, |
| 754 | 754 | 'raw' => '{{Commentaire biblio|'.$commentaire.'}}', |
@@ -69,13 +69,13 @@ |
||
| 69 | 69 | private $dataAnalysis; |
| 70 | 70 | |
| 71 | 71 | public function __construct(DbAdapter $dbAdapter, WikiBotConfig $bot, Memory $memory, RefGoogleBook $refGoogleBook, |
| 72 | - ?DataAnalysis $dataAnalysis=null) |
|
| 72 | + ?DataAnalysis $dataAnalysis = null) |
|
| 73 | 73 | { |
| 74 | 74 | $this->db = $dbAdapter; |
| 75 | 75 | $this->bot = $bot; |
| 76 | 76 | $this->memory = $memory; |
| 77 | 77 | $this->refGooConverter = $refGoogleBook; |
| 78 | - if($dataAnalysis) { |
|
| 78 | + if ($dataAnalysis) { |
|
| 79 | 79 | $this->dataAnalysis = $dataAnalysis; |
| 80 | 80 | } |
| 81 | 81 | |
@@ -173,7 +173,7 @@ |
||
| 173 | 173 | new EditInfo($this->taskName, $this->minorFlag, $this->botFlag) |
| 174 | 174 | ); |
| 175 | 175 | dump($result); |
| 176 | - echo "Sleep ".(string)static::SLEEP_AFTER_EDITION."\n"; |
|
| 176 | + echo "Sleep ".(string) static::SLEEP_AFTER_EDITION."\n"; |
|
| 177 | 177 | sleep(static::SLEEP_AFTER_EDITION); |
| 178 | 178 | } |
| 179 | 179 | } |
@@ -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='ZiziBotConfig'): string |
|
| 58 | + public function deleteAllReports(string $text, ?string $botName = 'ZiziBotConfig'): 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', |