Passed
Push — master ( dd1fbc...6aef8a )
by Daimona
01:29
created
includes/Task/Task.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme\Task;
4 4
 
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
14 14
 	 *
15 15
 	 * @return string[]
16 16
 	 */
17
-	abstract protected function getSubtasksMap() : array;
17
+	abstract protected function getSubtasksMap () : array;
18 18
 
19 19
 	/**
20 20
 	 * @param string $subtask Defined in self::SUBTASKS_MAP
21 21
 	 * @return TaskResult
22 22
 	 */
23
-	protected function runSubtask( string $subtask ) : TaskResult {
23
+	protected function runSubtask ( string $subtask ) : TaskResult {
24 24
 		$map = $this->getSubtasksMap();
25 25
 		if ( !isset( $map[ $subtask ] ) ) {
26 26
 			throw new \InvalidArgumentException( "'$subtask' is not a valid task." );
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @param string $class
37 37
 	 * @return Subtask
38 38
 	 */
39
-	private function getSubtaskInstance( string $class ) : Subtask {
39
+	private function getSubtaskInstance ( string $class ) : Subtask {
40 40
 		return new $class( $this->getDataProvider() );
41 41
 	}
42 42
 }
Please login to merge, or discard this patch.
includes/Task/StartNew.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme\Task;
4 4
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	/**
15 15
 	 * @inheritDoc
16 16
 	 */
17
-	public function run() : TaskResult {
17
+	public function run () : TaskResult {
18 18
 		$orderedList = [
19 19
 			'update-list',
20 20
 			'create-pages',
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	/**
34 34
 	 * @inheritDoc
35 35
 	 */
36
-	protected function getSubtasksMap() : array {
36
+	protected function getSubtasksMap () : array {
37 37
 		return [
38 38
 			'create-pages' => CreatePages::class,
39 39
 			'update-list' => UpdateList::class,
Please login to merge, or discard this patch.
includes/Task/TaskBase.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme\Task;
4 4
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	const STATUS_OK = 0;
15 15
 	const STATUS_ERROR = 1;
16 16
 	/** @var string[] */
17
-	protected $errors = [];
17
+	protected $errors = [ ];
18 18
 	/** @var TaskDataProvider */
19 19
 	protected $dataProvider;
20 20
 
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
 	 *
24 24
 	 * @param TaskDataProvider $dataProvider
25 25
 	 */
26
-	final public function __construct( TaskDataProvider $dataProvider ) {
26
+	final public function __construct ( TaskDataProvider $dataProvider ) {
27 27
 		set_exception_handler( [ $this, 'handleException' ] );
28 28
 		set_error_handler( [ $this, 'handleError' ] );
29 29
 		parent::__construct();
30 30
 		$this->dataProvider = $dataProvider;
31 31
 	}
32 32
 
33
-	public function __destruct() {
33
+	public function __destruct () {
34 34
 		restore_error_handler();
35 35
 		restore_exception_handler();
36 36
 	}
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 *
41 41
 	 * @return TaskResult
42 42
 	 */
43
-	abstract public function run() : TaskResult;
43
+	abstract public function run () : TaskResult;
44 44
 
45 45
 	/**
46 46
 	 * Exception handler.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param \Throwable $ex
49 49
 	 * @protected
50 50
 	 */
51
-	public function handleException( \Throwable $ex ) {
51
+	public function handleException ( \Throwable $ex ) {
52 52
 		$this->getLogger()->error(
53 53
 			get_class( $ex ) . ': ' .
54 54
 			$ex->getMessage() . "\nTrace:\n" .
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
 	 * @param int $errline
66 66
 	 * @protected
67 67
 	 */
68
-	public function handleError( $errno, $errstr, $errfile, $errline ) {
68
+	public function handleError ( $errno, $errstr, $errfile, $errline ) {
69 69
 		throw new \ErrorException( $errstr, 0, $errno, $errfile, $errline );
70 70
 	}
71 71
 
72 72
 	/**
73 73
 	 * @return TaskDataProvider
74 74
 	 */
75
-	protected function getDataProvider() : TaskDataProvider {
75
+	protected function getDataProvider () : TaskDataProvider {
76 76
 		return $this->dataProvider;
77 77
 	}
78 78
 }
Please login to merge, or discard this patch.
includes/Bot.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme;
4 4
 
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
 
12 12
 	const VERSION = 1.0;
13 13
 
14
-	public function __construct() {
14
+	public function __construct () {
15 15
 		$this->logger = new Logger;
16 16
 	}
17 17
 
18 18
 	/**
19 19
 	 * Entry point for the whole process
20 20
 	 */
21
-	public function run() {
21
+	public function run () {
22 22
 		$this->logger->info( 'Starting full process.' );
23 23
 		$manager = new TaskManager;
24 24
 		$res = $manager->run( TaskManager::MODE_COMPLETE );
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 *
36 36
 	 * @param string $task
37 37
 	 */
38
-	public function runTask( string $task ) {
38
+	public function runTask ( string $task ) {
39 39
 		$this->logger->info( "Starting single task $task." );
40 40
 		$manager = new TaskManager;
41 41
 		$res = $manager->run( TaskManager::MODE_TASK, $task );
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 *
53 53
 	 * @param string $subtask
54 54
 	 */
55
-	public function runSubtask( string $subtask ) {
55
+	public function runSubtask ( string $subtask ) {
56 56
 		$this->logger->info( "Starting single subtask $subtask." );
57 57
 		$manager = new TaskManager;
58 58
 		$res = $manager->run( TaskManager::MODE_SUBTASK, $subtask );
Please login to merge, or discard this patch.
includes/TaskManager.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme;
4 4
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param string|null $name Only used in MODE_TASK and MODE_SUBTASK
48 48
 	 * @return TaskResult
49 49
 	 */
50
-	public function run( int $mode, string $name = null ) : TaskResult {
50
+	public function run ( int $mode, string $name = null ) : TaskResult {
51 51
 		$this->provider = new TaskDataProvider;
52 52
 
53 53
 		if ( $mode === self::MODE_COMPLETE ) {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return TaskResult
66 66
 	 */
67
-	protected function runAllTasks() : TaskResult {
67
+	protected function runAllTasks () : TaskResult {
68 68
 		if ( self::getLastFullRunDate() === date( 'd/m/Y' ) ) {
69 69
 			// Really avoid executing twice the same day
70 70
 			return new TaskResult( TaskResult::STATUS_ERROR, [ 'A full run was already executed today.' ] );
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 * @param string $name
96 96
 	 * @return TaskResult
97 97
 	 */
98
-	protected function runTask( string $name ) : TaskResult {
98
+	protected function runTask ( string $name ) : TaskResult {
99 99
 		if ( !isset( self::TASKS_MAP[ $name ] ) ) {
100 100
 			throw new \InvalidArgumentException( "'$name' is not a valid task." );
101 101
 		}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 * @param string $name
111 111
 	 * @return TaskResult
112 112
 	 */
113
-	protected function runSubtask( string $name ) : TaskResult {
113
+	protected function runSubtask ( string $name ) : TaskResult {
114 114
 		if ( !isset( self::SUBTASKS_MAP[ $name ] ) ) {
115 115
 			throw new \InvalidArgumentException( "'$name' is not a valid subtask." );
116 116
 		}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	 * @return string|null d/m/Y or null if no last run registered
125 125
 	 * @fixme Is this even necessary?
126 126
 	 */
127
-	public static function getLastFullRunDate() : ?string {
127
+	public static function getLastFullRunDate () : ?string {
128 128
 		if ( file_exists( self::LOG_FILE ) ) {
129 129
 			return file_get_contents( self::LOG_FILE ) ?: null;
130 130
 		} else {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 * @param string $class
139 139
 	 * @return Task
140 140
 	 */
141
-	private function getTaskInstance( string $class ) : Task {
141
+	private function getTaskInstance ( string $class ) : Task {
142 142
 		return new $class( $this->provider );
143 143
 	}
144 144
 
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
 	 * @param string $class
149 149
 	 * @return Subtask
150 150
 	 */
151
-	private function getSubtaskInstance( string $class ) : Subtask {
151
+	private function getSubtaskInstance ( string $class ) : Subtask {
152 152
 		return new $class( $this->provider );
153 153
 	}
154 154
 
155
-	public static function setLastFullRunDate() {
155
+	public static function setLastFullRunDate () {
156 156
 		file_put_contents( self::LOG_FILE, date( 'd/m/Y' ) );
157 157
 	}
158 158
 }
Please login to merge, or discard this patch.
run.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 /**
3 3
  * Entry point for the bot, called by CLI
4 4
  */
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 /* URL (for debugging purpose) */
39 39
 $urlParam = getopt( '', [ 'force-url:' ] );
40
-$url = $urlParam['force-url'] ?? 'https://it.wikipedia.org/w/api.php';
40
+$url = $urlParam[ 'force-url' ] ?? 'https://it.wikipedia.org/w/api.php';
41 41
 
42 42
 define( 'DEFAULT_URL', $url );
43 43
 
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 
88 88
 if ( count( $taskOpts ) === 2 ) {
89 89
 	throw new InvalidArgumentException( 'Cannot specify both task and subtask.' );
90
-} elseif ( isset( $taskOpts['task'] ) ) {
90
+} elseif ( isset( $taskOpts[ 'task' ] ) ) {
91 91
 	$bot->runTask( $taskOpts[ 'task' ] );
92
-} elseif ( isset( $taskOpts['subtask'] ) ) {
92
+} elseif ( isset( $taskOpts[ 'subtask' ] ) ) {
93 93
 	$bot->runSubtask( $taskOpts[ 'subtask' ] );
94 94
 } else {
95 95
 	$bot->run();
Please login to merge, or discard this patch.
includes/Task/CloseOld.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme\Task;
4 4
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	/**
16 16
 	 * @inheritDoc
17 17
 	 */
18
-	public function run() : TaskResult {
18
+	public function run () : TaskResult {
19 19
 		$orderedList = [
20 20
 			'close-pages',
21 21
 			'archive-pages',
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	/**
35 35
 	 * @inheritDoc
36 36
 	 */
37
-	protected function getSubtasksMap(): array {
37
+	protected function getSubtasksMap (): array {
38 38
 		return [
39 39
 			'archive-pages' => ArchivePages::class,
40 40
 			'close-pages' => ClosePages::class,
Please login to merge, or discard this patch.
includes/Task/StartVote.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme\Task;
4 4
 
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
 	/**
17 17
 	 * @inheritDoc
18 18
 	 */
19
-	protected function getSubtasksMap(): array {
19
+	protected function getSubtasksMap (): array {
20 20
 		// Everything is done here.
21
-		return [];
21
+		return [ ];
22 22
 	}
23 23
 
24 24
 	/**
25 25
 	 * @inheritDoc
26 26
 	 */
27
-	public function run() : TaskResult {
27
+	public function run () : TaskResult {
28 28
 		$this->getLogger()->info( 'Starting task StartVote' );
29 29
 
30 30
 		$pages = $this->getDataProvider()->getOpenPages();
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * @param PageRiconferma[] $pages
44 44
 	 */
45
-	protected function processPages( array $pages ) {
46
-		$actualPages = [];
45
+	protected function processPages ( array $pages ) {
46
+		$actualPages = [ ];
47 47
 		foreach ( $pages as $page ) {
48 48
 			if ( $page->hasOpposition() && !$page->isVote() ) {
49 49
 				$this->openVote( $page );
50
-				$actualPages[] = $page;
50
+				$actualPages[ ] = $page;
51 51
 			}
52 52
 		}
53 53
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @param PageRiconferma $page
66 66
 	 */
67
-	protected function openVote( PageRiconferma $page ) {
67
+	protected function openVote ( PageRiconferma $page ) {
68 68
 		$this->getLogger()->info( "Starting vote on $page" );
69 69
 
70 70
 		$content = $page->getContent();
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
 	 * @see SimpleUpdates::updateVote()
104 104
 	 * @see UpdatesAround::addVote()
105 105
 	 */
106
-	protected function updateVotePage( array $pages ) {
106
+	protected function updateVotePage ( array $pages ) {
107 107
 		$votePage = new Page( $this->getConfig()->get( 'ric-vote-page' ) );
108 108
 		$content = $votePage->getContent();
109 109
 
110
-		$titles = [];
110
+		$titles = [ ];
111 111
 		foreach ( $pages as $page ) {
112
-			$titles[] = preg_quote( $page->getTitle() );
112
+			$titles[ ] = preg_quote( $page->getTitle() );
113 113
 		}
114 114
 		$titleReg = implode( '|', array_map( 'preg_quote', $titles ) );
115 115
 		$search = "!^\*.+ La \[\[($titleReg)\|procedura]] termina.+\n!gm";
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
 			$newContent = preg_replace( $introReg, '$0' . "\n$newLines", $newContent, 1 );
133 133
 		} else {
134 134
 			// Start section
135
-			$matches = [];
135
+			$matches = [ ];
136 136
 			if ( preg_match( $introReg, $content, $matches ) === false ) {
137 137
 				throw new TaskException( 'Intro not found in vote page' );
138 138
 			}
139 139
 			$beforeReg = '!INSERIRE LA NOTIZIA PIÙ NUOVA IN CIMA.+!m';
140 140
 			// Replace semicolon with full stop
141 141
 			$newLines = substr( $newLines, 0, -2 ) . ".\n";
142
-			$newContent = preg_replace( $beforeReg, '$0' . "\n{$matches[0]}\n$newLines", $newContent, 1 );
142
+			$newContent = preg_replace( $beforeReg, '$0' . "\n{$matches[ 0 ]}\n$newLines", $newContent, 1 );
143 143
 		}
144 144
 
145 145
 		$summary = $this->msg( 'vote-start-vote-page-summary' )
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 * @see UpdatesAround::addNews()
162 162
 	 * @see SimpleUpdates::updateNews()
163 163
 	 */
164
-	protected function updateNews( int $amount ) {
164
+	protected function updateNews ( int $amount ) {
165 165
 		$this->getLogger()->info( "Turning $amount pages into votes" );
166 166
 		$newsPage = new Page( $this->getConfig()->get( 'ric-news-page' ) );
167 167
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		$regTac = '!(\| *riconferme[ _]tacite[ _]amministratori *= *)(\d+)!';
170 170
 		$regVot = '!(\| *riconferme[ _]voto[ _]amministratori *= *)(\d+)!';
171 171
 
172
-		$tacMatches = $votMatches = [];
172
+		$tacMatches = $votMatches = [ ];
173 173
 		if ( preg_match( $regTac, $content, $tacMatches ) === false ) {
174 174
 			throw new TaskException( 'Param "tacite" not found in news page' );
175 175
 		}
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
 			throw new TaskException( 'Param "voto" not found in news page' );
178 178
 		}
179 179
 
180
-		$newTac = (int)$tacMatches[2] - $amount ?: '';
181
-		$newVot = (int)$votMatches[2] + $amount ?: '';
180
+		$newTac = (int)$tacMatches[ 2 ] - $amount ?: '';
181
+		$newVot = (int)$votMatches[ 2 ] + $amount ?: '';
182 182
 
183 183
 		$newContent = preg_replace( $regTac, '${1}' . $newTac, $content );
184 184
 		$newContent = preg_replace( $regVot, '${1}' . $newVot, $newContent );
Please login to merge, or discard this patch.
includes/Task/Subtask/FailedUpdates.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme\Task\Subtask;
4 4
 
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	/**
14 14
 	 * @inheritDoc
15 15
 	 */
16
-	public function run() : TaskResult {
16
+	public function run () : TaskResult {
17 17
 		$this->getLogger()->info( 'Starting task FailedUpdates' );
18 18
 
19 19
 		$failed = $this->getFailures();
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
 	 *
34 34
 	 * @return PageRiconferma[]
35 35
 	 */
36
-	private function getFailures() : array {
37
-		$ret = [];
36
+	private function getFailures () : array {
37
+		$ret = [ ];
38 38
 		$allPages = $this->getDataProvider()->getPagesToClose();
39 39
 		foreach ( $allPages as $page ) {
40 40
 			if ( $page->getOutcome() & PageRiconferma::OUTCOME_FAIL ) {
41
-				$ret[] = $page;
41
+				$ret[ ] = $page;
42 42
 			}
43 43
 		}
44 44
 		return $ret;
@@ -47,17 +47,17 @@  discard block
 block discarded – undo
47 47
 	/**
48 48
 	 * @param PageRiconferma[] $pages
49 49
 	 */
50
-	protected function updateBurList( array $pages ) {
50
+	protected function updateBurList ( array $pages ) {
51 51
 		$this->getLogger()->info( 'Checking if bur list needs updating.' );
52 52
 		$admins = $this->getDataProvider()->getUsersList();
53 53
 
54
-		$remove = [];
54
+		$remove = [ ];
55 55
 		foreach ( $pages as $page ) {
56 56
 			$user = $page->getUser();
57 57
 			if ( array_key_exists( 'bureaucrat', $admins[ $user ] ) &&
58 58
 				$page->getOutcome() & PageRiconferma::OUTCOME_FAIL
59 59
 			) {
60
-				$remove[] = $user;
60
+				$remove[ ] = $user;
61 61
 			}
62 62
 		}
63 63
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			$lastUser = array_pop( $remove );
77 77
 			$removeList = implode( ', ', $remove ) . " e $lastUser";
78 78
 		} else {
79
-			$removeList = $remove[0];
79
+			$removeList = $remove[ 0 ];
80 80
 		}
81 81
 
82 82
 		$summary = $this->msg( 'bur-list-update-summary' )
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 *
96 96
 	 * @param PageRiconferma[] $pages
97 97
 	 */
98
-	protected function requestRemoval( array $pages ) {
98
+	protected function requestRemoval ( array $pages ) {
99 99
 		$this->getLogger()->info(
100 100
 			'Requesting removal on meta for: ' . implode( ', ', array_map( 'strval', $pages ) )
101 101
 		);
@@ -138,14 +138,14 @@  discard block
 block discarded – undo
138 138
 	 *
139 139
 	 * @param PageRiconferma[] $pages
140 140
 	 */
141
-	protected function updateAnnunci( array $pages ) {
141
+	protected function updateAnnunci ( array $pages ) {
142 142
 		$this->getLogger()->info( 'Updating annunci' );
143 143
 
144
-		$names = [];
144
+		$names = [ ];
145 145
 		$text = '';
146 146
 		foreach ( $pages as $page ) {
147 147
 			$user = $page->getUser();
148
-			$names[] = $user;
148
+			$names[ ] = $user;
149 149
 			$text .= "{{Breve|admin|{{subst:#time:j}}|[[Utente:$user|]] " .
150 150
 				"non è stato riconfermato [[WP:A|amministratore]].}}\n";
151 151
 		}
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 			$lastUser = array_pop( $names );
169 169
 			$namesList = implode( ', ', $names ) . " e $lastUser";
170 170
 		} else {
171
-			$namesList = $names[0];
171
+			$namesList = $names[ 0 ];
172 172
 		}
173 173
 
174 174
 		$summary = $this->msg( 'annunci-summary' )
@@ -187,16 +187,16 @@  discard block
 block discarded – undo
187 187
 	 *
188 188
 	 * @param PageRiconferma[] $pages
189 189
 	 */
190
-	protected function updateUltimeNotizie( array $pages ) {
190
+	protected function updateUltimeNotizie ( array $pages ) {
191 191
 		$this->getLogger()->info( 'Updating ultime notizie' );
192 192
 		$notiziePage = new Page( $this->getConfig()->get( 'ultimenotizie-title' ) );
193 193
 
194
-		$names = [];
194
+		$names = [ ];
195 195
 		$text = '';
196 196
 		foreach ( $pages as $page ) {
197 197
 			$user = $page->getUser();
198 198
 			$title = $page->getTitle();
199
-			$names[] = $user;
199
+			$names[ ] = $user;
200 200
 			$text .= "'''{{subst:#time:j F}}''': [[Utente:$user|]] non è stato [[$title|riconfermato]] " .
201 201
 				'[[WP:A|amministratore]]; ora gli admin sono {{subst:#expr: {{NUMBEROFADMINS}} - 1}}.';
202 202
 		}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			$lastUser = array_pop( $names );
216 216
 			$namesList = implode( ', ', $names ) . " e $lastUser";
217 217
 		} else {
218
-			$namesList = $names[0];
218
+			$namesList = $names[ 0 ];
219 219
 		}
220 220
 
221 221
 		$summary = $this->msg( 'ultimenotizie-summary' )
Please login to merge, or discard this patch.