@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare( strict_types=1 ); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace BotRiconferme\Task\Subtask; |
| 4 | 4 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | /** |
| 17 | 17 | * @inheritDoc |
| 18 | 18 | */ |
| 19 | - public function runInternal() : int { |
|
| 19 | + public function runInternal () : int { |
|
| 20 | 20 | $users = $this->getDataProvider()->getUsersToProcess(); |
| 21 | 21 | |
| 22 | 22 | if ( !$users ) { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * |
| 36 | 36 | * @param User $user |
| 37 | 37 | */ |
| 38 | - protected function processUser( User $user ) { |
|
| 38 | + protected function processUser ( User $user ) { |
|
| 39 | 39 | try { |
| 40 | 40 | $num = $this->getLastPageNum( $user ) + 1; |
| 41 | 41 | } catch ( TaskException $e ) { |
@@ -69,14 +69,14 @@ discard block |
||
| 69 | 69 | * @return int |
| 70 | 70 | * @throws TaskException |
| 71 | 71 | */ |
| 72 | - protected function getLastPageNum( User $user ) : int { |
|
| 72 | + protected function getLastPageNum ( User $user ) : int { |
|
| 73 | 73 | $this->getLogger()->debug( "Retrieving previous pages for $user" ); |
| 74 | 74 | |
| 75 | - $unprefixedTitle = explode( ':', $this->getOpt( 'main-page-title' ), 2 )[1]; |
|
| 75 | + $unprefixedTitle = explode( ':', $this->getOpt( 'main-page-title' ), 2 )[ 1 ]; |
|
| 76 | 76 | |
| 77 | 77 | $prefixes = [ "$unprefixedTitle/$user/" ]; |
| 78 | 78 | foreach ( $user->getAliases() as $alias ) { |
| 79 | - $prefixes[] = "$unprefixedTitle/$alias/"; |
|
| 79 | + $prefixes[ ] = "$unprefixedTitle/$alias/"; |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | $params = [ |
@@ -112,14 +112,14 @@ discard block |
||
| 112 | 112 | * @param string $title |
| 113 | 113 | * @param User $user |
| 114 | 114 | */ |
| 115 | - protected function createPage( string $title, User $user ) { |
|
| 115 | + protected function createPage ( string $title, User $user ) { |
|
| 116 | 116 | $this->getLogger()->info( "Creating page $title" ); |
| 117 | 117 | $groups = $user->getGroups(); |
| 118 | 118 | $textParams = [ |
| 119 | 119 | '$user' => $user->getName(), |
| 120 | - '$date' => $groups['sysop'], |
|
| 121 | - '$burocrate' => $groups['bureaucrat'] ?? '', |
|
| 122 | - '$checkuser' => $groups['checkuser'] ?? '' |
|
| 120 | + '$date' => $groups[ 'sysop' ], |
|
| 121 | + '$burocrate' => $groups[ 'bureaucrat' ] ?? '', |
|
| 122 | + '$checkuser' => $groups[ 'checkuser' ] ?? '' |
|
| 123 | 123 | ]; |
| 124 | 124 | |
| 125 | 125 | $params = [ |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * @param Page $basePage |
| 138 | 138 | * @param string $newText |
| 139 | 139 | */ |
| 140 | - protected function createBasePage( Page $basePage, string $newText ) { |
|
| 140 | + protected function createBasePage ( Page $basePage, string $newText ) { |
|
| 141 | 141 | $this->getLogger()->info( "Creating base page $basePage" ); |
| 142 | 142 | |
| 143 | 143 | $params = [ |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | * @param Page $basePage |
| 154 | 154 | * @param string $newText |
| 155 | 155 | */ |
| 156 | - protected function updateBasePage( Page $basePage, string $newText ) { |
|
| 156 | + protected function updateBasePage ( Page $basePage, string $newText ) { |
|
| 157 | 157 | $this->getLogger()->info( "Updating base page $basePage" ); |
| 158 | 158 | |
| 159 | 159 | $params = [ |