@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $editInfo = new EditInfo(static::BOT_TALK_SUMMARY); |
| 54 | 54 | $success = $page->addToBottomOfThePage($addText, $editInfo); |
| 55 | 55 | |
| 56 | - return (bool)$success; |
|
| 56 | + return (bool) $success; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | private function generateTalkText(?string $toEditor = null, ?string $identation = ':') |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | $sentences = file(self::BOT_TALK_FILE); |
| 71 | 71 | |
| 72 | - return (string)trim($sentences[array_rand($sentences)]); |
|
| 72 | + return (string) trim($sentences[array_rand($sentences)]); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -173,9 +173,9 @@ |
||
| 173 | 173 | */ |
| 174 | 174 | public function minutesSinceLastEdit(string $title): int |
| 175 | 175 | { |
| 176 | - $time = $this->getTimestamp($title); // 2011-09-02T16:31:13Z |
|
| 176 | + $time = $this->getTimestamp($title); // 2011-09-02T16:31:13Z |
|
| 177 | 177 | |
| 178 | - return (int)round((time() - strtotime($time)) / 60); |
|
| 178 | + return (int) round((time() - strtotime($time)) / 60); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | try { |
| 45 | 45 | $this->page = $wiki->newPageGetter()->getFromTitle($title); |
| 46 | 46 | } catch (Throwable $e) { |
| 47 | - throw new Exception('Erreur construct WikiPageAction '. $e->getMessage()); |
|
| 47 | + throw new Exception('Erreur construct WikiPageAction '.$e->getMessage()); |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | return null; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - $nbResults = (int)$xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0; |
|
| 77 | + $nbResults = (int) $xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0; |
|
| 78 | 78 | |
| 79 | 79 | if (0 === $nbResults) { |
| 80 | 80 | return null; |