Passed
Push — master ( cfeed2...9edbb3 )
by Daimona
01:56
created
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
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	/**
17 17
 	 * @inheritDoc
18 18
 	 */
19
-	public function runInternal() : int {
19
+	public function runInternal () : int {
20 20
 		$failed = $this->getFailures();
21 21
 		if ( !$failed ) {
22 22
 			return TaskResult::STATUS_NOTHING;
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 	 *
41 41
 	 * @return PageRiconferma[]
42 42
 	 */
43
-	private function getFailures() : array {
44
-		$ret = [];
43
+	private function getFailures () : array {
44
+		$ret = [ ];
45 45
 		$allPages = $this->getDataProvider()->getPagesToClose();
46 46
 		foreach ( $allPages as $page ) {
47 47
 			if ( $page->getOutcome() & PageRiconferma::OUTCOME_FAIL ) {
48
-				$ret[] = $page;
48
+				$ret[ ] = $page;
49 49
 			}
50 50
 		}
51 51
 		return $ret;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	/**
55 55
 	 * @param User[] $users
56 56
 	 */
57
-	protected function updateBurList( array $users ) : void {
57
+	protected function updateBurList ( array $users ) : void {
58 58
 		$this->getLogger()->info( 'Updating bur list. Removing: ' . implode( ', ', $users ) );
59 59
 		$remList = RegexUtils::regexFromArray( '!', ...$users );
60 60
 		$burList = $this->getPage( $this->getOpt( 'bur-list-title' ) );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 *
78 78
 	 * @param PageRiconferma[] $pages
79 79
 	 */
80
-	protected function requestRemoval( array $pages ) : void {
80
+	protected function requestRemoval ( array $pages ) : void {
81 81
 		$this->getLogger()->info( 'Requesting flag removal for: ' . implode( ', ', $pages ) );
82 82
 
83 83
 		$metaWiki = $this->getWikiGroup()->getCentralWiki();
@@ -114,15 +114,15 @@  discard block
 block discarded – undo
114 114
 	 *
115 115
 	 * @param PageRiconferma[] $pages
116 116
 	 */
117
-	protected function updateAnnunci( array $pages ) : void {
117
+	protected function updateAnnunci ( array $pages ) : void {
118 118
 		$this->getLogger()->info( 'Updating annunci' );
119 119
 		$section = 1;
120 120
 
121
-		$names = [];
121
+		$names = [ ];
122 122
 		$text = '';
123 123
 		foreach ( $pages as $page ) {
124 124
 			$user = $page->getUserName();
125
-			$names[] = $user;
125
+			$names[ ] = $user;
126 126
 			$text .= $this->msg( 'annunci-text' )->params( [ '$user' => $user ] )->text();
127 127
 		}
128 128
 
@@ -154,16 +154,16 @@  discard block
 block discarded – undo
154 154
 	 *
155 155
 	 * @param PageRiconferma[] $pages
156 156
 	 */
157
-	protected function updateUltimeNotizie( array $pages ) : void {
157
+	protected function updateUltimeNotizie ( array $pages ) : void {
158 158
 		$this->getLogger()->info( 'Updating ultime notizie' );
159 159
 		$notiziePage = $this->getPage( $this->getOpt( 'ultimenotizie-page-title' ) );
160 160
 
161
-		$names = [];
161
+		$names = [ ];
162 162
 		$text = '';
163 163
 		$msg = $this->msg( 'ultimenotizie-text' );
164 164
 		foreach ( $pages as $page ) {
165 165
 			$user = $page->getUserName();
166
-			$names[] = $user;
166
+			$names[ ] = $user;
167 167
 			$text .= $msg->params( [ '$user' => $user, '$title' => $page->getTitle() ] )->text();
168 168
 		}
169 169
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 *
192 192
 	 * @param PageRiconferma[] $pages
193 193
 	 */
194
-	protected function updateTimeline( array $pages ) : void {
194
+	protected function updateTimeline ( array $pages ) : void {
195 195
 		$this->getLogger()->info( 'Updating timeline' );
196 196
 		$timelinePage = $this->getPage( $this->getOpt( 'timeline-page-title' ) );
197 197
 		$content = $timelinePage->getContent();
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	 *
220 220
 	 * @param PageRiconferma[] $pages
221 221
 	 */
222
-	private function updateCronologia( array $pages ) : void {
222
+	private function updateCronologia ( array $pages ) : void {
223 223
 		$this->getLogger()->info( 'Updating cronologia' );
224 224
 		$timelinePage = $this->getPage( $this->getOpt( 'cronologia-page-title' ) );
225 225
 		$content = $timelinePage->getContent();
@@ -247,12 +247,12 @@  discard block
 block discarded – undo
247 247
 	 * @param PageRiconferma[] $pages
248 248
 	 * @return User[]
249 249
 	 */
250
-	private function getFailedBureaucrats( array $pages ) : array {
251
-		$ret = [];
250
+	private function getFailedBureaucrats ( array $pages ) : array {
251
+		$ret = [ ];
252 252
 		foreach ( $pages as $page ) {
253 253
 			$user = $this->getUser( $page->getUserName() );
254 254
 			if ( $user->inGroup( 'bureaucrat' ) ) {
255
-				$ret[] = $user;
255
+				$ret[ ] = $user;
256 256
 			}
257 257
 		}
258 258
 		return $ret;
Please login to merge, or discard this patch.