| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 58 | 1 | public function deleteAllReports(string $text, ?string $botName = 'CodexBot'): string |
|
| 59 | { |
||
| 60 | 1 | $pattern = sprintf( |
|
| 61 | 1 | '#== Ouvrage avec erreur de paramètre ==(.*)Le robot \[\[Utilisateur:%s\|%s\]\] \(\[\[Discussion utilisateur:%s\|discuter\]\]\) [0-9a-zéà: ]+ \([A-Z]+\)[\n]*#s', |
|
| 62 | 1 | $botName, |
|
| 63 | 1 | $botName, |
|
| 64 | 1 | $botName |
|
| 65 | ); |
||
| 66 | // option s : dot matches new lines |
||
| 67 | 1 | $text = preg_replace( |
|
| 68 | 1 | $pattern, |
|
| 69 | 1 | '', |
|
| 70 | 1 | $text |
|
| 71 | ); |
||
| 72 | |||
| 73 | 1 | return $text; |
|
| 74 | } |
||
| 76 |