@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | |
27 | 27 | $wiki = ServiceFactory::wikiApi(); |
28 | 28 | $pages = $wiki->newPageListGetter()->getPageListFromCategoryName('Catégorie:Signalement_'.$botName); |
29 | -if(!$pages) { |
|
29 | +if (!$pages) { |
|
30 | 30 | throw new \Exception("rien trouvé dans catégorie"); |
31 | 31 | } |
32 | 32 | $pages = $pages->toArray(); |
33 | 33 | $res = []; |
34 | -foreach ($pages as $page){ |
|
34 | +foreach ($pages as $page) { |
|
35 | 35 | /** |
36 | 36 | * @var $page Page |
37 | 37 | */ |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $talkTitles = file($filename); |
49 | 49 | |
50 | 50 | foreach ($talkTitles as $talkTitle) { |
51 | - $talkTitle = str_replace('Talk:','Discussion:', $talkTitle); |
|
51 | + $talkTitle = str_replace('Talk:', 'Discussion:', $talkTitle); |
|
52 | 52 | sleep(10); |
53 | 53 | echo "$talkTitle \n"; |
54 | 54 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | * |
55 | 55 | * @return string |
56 | 56 | */ |
57 | - public function deleteAllReports(string $text, ?string $botName='ZiziBot'): string |
|
57 | + public function deleteAllReports(string $text, ?string $botName = 'ZiziBot'): string |
|
58 | 58 | { |
59 | 59 | $pattern = sprintf( |
60 | 60 | '#== Ouvrage avec erreur de paramètre ==(.*)Le robot \[\[Utilisateur:%s\|%s\]\] \(\[\[Discussion utilisateur:%s\|discuter\]\]\) [0-9a-zéà: ]+ \(CET\)[\n]*#s', |