Passed
Push — master ( 0d0277...cfeed2 )
by Daimona
02:12
created
includes/Task/Subtask/FailedUpdates.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\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;
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @return PageRiconferma[]
41 41
 	 */
42
-	private function getFailures() : array {
43
-		$ret = [];
42
+	private function getFailures () : array {
43
+		$ret = [ ];
44 44
 		$allPages = $this->getDataProvider()->getPagesToClose();
45 45
 		foreach ( $allPages as $page ) {
46 46
 			if ( $page->getOutcome() & PageRiconferma::OUTCOME_FAIL ) {
47
-				$ret[] = $page;
47
+				$ret[ ] = $page;
48 48
 			}
49 49
 		}
50 50
 		return $ret;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	/**
54 54
 	 * @param User[] $users
55 55
 	 */
56
-	protected function updateBurList( array $users ) : void {
56
+	protected function updateBurList ( array $users ) : void {
57 57
 		$this->getLogger()->info( 'Updating bur list. Removing: ' . implode( ', ', $users ) );
58 58
 		$remList = RegexUtils::regexFromArray( '!', ...$users );
59 59
 		$burList = $this->getPage( $this->getOpt( 'bur-list-title' ) );
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 *
77 77
 	 * @param PageRiconferma[] $pages
78 78
 	 */
79
-	protected function requestRemoval( array $pages ) : void {
79
+	protected function requestRemoval ( array $pages ) : void {
80 80
 		$this->getLogger()->info( 'Requesting flag removal for: ' . implode( ', ', $pages ) );
81 81
 
82 82
 		$metaWiki = $this->getWikiGroup()->getCentralWiki();
@@ -113,15 +113,15 @@  discard block
 block discarded – undo
113 113
 	 *
114 114
 	 * @param PageRiconferma[] $pages
115 115
 	 */
116
-	protected function updateAnnunci( array $pages ) : void {
116
+	protected function updateAnnunci ( array $pages ) : void {
117 117
 		$this->getLogger()->info( 'Updating annunci' );
118 118
 		$section = 1;
119 119
 
120
-		$names = [];
120
+		$names = [ ];
121 121
 		$text = '';
122 122
 		foreach ( $pages as $page ) {
123 123
 			$user = $page->getUserName();
124
-			$names[] = $user;
124
+			$names[ ] = $user;
125 125
 			$text .= $this->msg( 'annunci-text' )->params( [ '$user' => $user ] )->text();
126 126
 		}
127 127
 
@@ -153,16 +153,16 @@  discard block
 block discarded – undo
153 153
 	 *
154 154
 	 * @param PageRiconferma[] $pages
155 155
 	 */
156
-	protected function updateUltimeNotizie( array $pages ) : void {
156
+	protected function updateUltimeNotizie ( array $pages ) : void {
157 157
 		$this->getLogger()->info( 'Updating ultime notizie' );
158 158
 		$notiziePage = $this->getPage( $this->getOpt( 'ultimenotizie-page-title' ) );
159 159
 
160
-		$names = [];
160
+		$names = [ ];
161 161
 		$text = '';
162 162
 		$msg = $this->msg( 'ultimenotizie-text' );
163 163
 		foreach ( $pages as $page ) {
164 164
 			$user = $page->getUserName();
165
-			$names[] = $user;
165
+			$names[ ] = $user;
166 166
 			$text .= $msg->params( [ '$user' => $user, '$title' => $page->getTitle() ] )->text();
167 167
 		}
168 168
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 *
191 191
 	 * @param PageRiconferma[] $pages
192 192
 	 */
193
-	protected function updateTimeline( array $pages ) : void {
193
+	protected function updateTimeline ( array $pages ) : void {
194 194
 		$this->getLogger()->info( 'Updating timeline' );
195 195
 		$timelinePage = $this->getPage( $this->getOpt( 'timeline-page-title' ) );
196 196
 		$content = $timelinePage->getContent();
@@ -219,12 +219,12 @@  discard block
 block discarded – undo
219 219
 	 * @param PageRiconferma[] $pages
220 220
 	 * @return User[]
221 221
 	 */
222
-	private function getFailedBureaucrats( array $pages ) : array {
223
-		$ret = [];
222
+	private function getFailedBureaucrats ( array $pages ) : array {
223
+		$ret = [ ];
224 224
 		foreach ( $pages as $page ) {
225 225
 			$user = $this->getUser( $page->getUserName() );
226 226
 			if ( $user->inGroup( 'bureaucrat' ) ) {
227
-				$ret[] = $user;
227
+				$ret[ ] = $user;
228 228
 			}
229 229
 		}
230 230
 		return $ret;
Please login to merge, or discard this patch.