@@ -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 = [ |
@@ -110,14 +110,14 @@ discard block |
||
| 110 | 110 | * @param string $title |
| 111 | 111 | * @param User $user |
| 112 | 112 | */ |
| 113 | - protected function createPage( string $title, User $user ) { |
|
| 113 | + protected function createPage ( string $title, User $user ) { |
|
| 114 | 114 | $this->getLogger()->info( "Creating page $title" ); |
| 115 | 115 | $groups = $user->getGroupsWithDates(); |
| 116 | 116 | $textParams = [ |
| 117 | 117 | '$user' => $user->getName(), |
| 118 | - '$date' => $groups['sysop'], |
|
| 119 | - '$burocrate' => $groups['bureaucrat'] ?? '', |
|
| 120 | - '$checkuser' => $groups['checkuser'] ?? '' |
|
| 118 | + '$date' => $groups[ 'sysop' ], |
|
| 119 | + '$burocrate' => $groups[ 'bureaucrat' ] ?? '', |
|
| 120 | + '$checkuser' => $groups[ 'checkuser' ] ?? '' |
|
| 121 | 121 | ]; |
| 122 | 122 | |
| 123 | 123 | $params = [ |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | * @param Page $basePage |
| 136 | 136 | * @param string $newText |
| 137 | 137 | */ |
| 138 | - protected function createBasePage( Page $basePage, string $newText ) { |
|
| 138 | + protected function createBasePage ( Page $basePage, string $newText ) { |
|
| 139 | 139 | $this->getLogger()->info( "Creating base page $basePage" ); |
| 140 | 140 | |
| 141 | 141 | $params = [ |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | * @param Page $basePage |
| 152 | 152 | * @param string $newText |
| 153 | 153 | */ |
| 154 | - protected function updateBasePage( Page $basePage, string $newText ) { |
|
| 154 | + protected function updateBasePage ( Page $basePage, string $newText ) { |
|
| 155 | 155 | $this->getLogger()->info( "Updating base page $basePage" ); |
| 156 | 156 | |
| 157 | 157 | $params = [ |