Passed
Push — master ( 390609...8584e7 )
by Daimona
02:06
created
includes/Task/Subtask/FailedUpdates.php 1 patch
Spacing   +16 added lines, -16 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;
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
 	 *
39 39
 	 * @return PageRiconferma[]
40 40
 	 */
41
-	private function getFailures() : array {
42
-		$ret = [];
41
+	private function getFailures () : array {
42
+		$ret = [ ];
43 43
 		$allPages = $this->getDataProvider()->getPagesToClose();
44 44
 		foreach ( $allPages as $page ) {
45 45
 			if ( $page->getOutcome() & PageRiconferma::OUTCOME_FAIL ) {
46
-				$ret[] = $page;
46
+				$ret[ ] = $page;
47 47
 			}
48 48
 		}
49 49
 		return $ret;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	/**
53 53
 	 * @param User[] $users
54 54
 	 */
55
-	protected function updateBurList( array $users ) {
55
+	protected function updateBurList ( array $users ) {
56 56
 		$this->getLogger()->info( 'Updating bur list. Removing: ' . implode( ', ', $users ) );
57 57
 		$remList = Element::regexFromArray( $users );
58 58
 		$burList = $this->getPage( $this->getOpt( 'bur-list-title' ) );
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 *
76 76
 	 * @param PageRiconferma[] $pages
77 77
 	 */
78
-	protected function requestRemoval( array $pages ) {
78
+	protected function requestRemoval ( array $pages ) {
79 79
 		$this->getLogger()->info( 'Requesting flag removal for: ' . implode( ', ', $pages ) );
80 80
 
81 81
 		$metaWiki = $this->getWiki()->cloneWithDomain( META_URL );
@@ -112,15 +112,15 @@  discard block
 block discarded – undo
112 112
 	 *
113 113
 	 * @param PageRiconferma[] $pages
114 114
 	 */
115
-	protected function updateAnnunci( array $pages ) {
115
+	protected function updateAnnunci ( array $pages ) {
116 116
 		$this->getLogger()->info( 'Updating annunci' );
117 117
 		$section = 1;
118 118
 
119
-		$names = [];
119
+		$names = [ ];
120 120
 		$text = '';
121 121
 		foreach ( $pages as $page ) {
122 122
 			$user = $page->getUser()->getName();
123
-			$names[] = $user;
123
+			$names[ ] = $user;
124 124
 			$text .= $this->msg( 'annunci-text' )->params( [ '$user' => $user ] )->text();
125 125
 		}
126 126
 
@@ -152,16 +152,16 @@  discard block
 block discarded – undo
152 152
 	 *
153 153
 	 * @param PageRiconferma[] $pages
154 154
 	 */
155
-	protected function updateUltimeNotizie( array $pages ) {
155
+	protected function updateUltimeNotizie ( array $pages ) {
156 156
 		$this->getLogger()->info( 'Updating ultime notizie' );
157 157
 		$notiziePage = $this->getPage( $this->getOpt( 'ultimenotizie-page-title' ) );
158 158
 
159
-		$names = [];
159
+		$names = [ ];
160 160
 		$text = '';
161 161
 		$msg = $this->msg( 'ultimenotizie-text' );
162 162
 		foreach ( $pages as $page ) {
163 163
 			$user = $page->getUser()->getName();
164
-			$names[] = $user;
164
+			$names[ ] = $user;
165 165
 			$text .= $msg->params( [ '$user' => $user, '$title' => $page->getTitle() ] )->text();
166 166
 		}
167 167
 
@@ -190,12 +190,12 @@  discard block
 block discarded – undo
190 190
 	 * @param PageRiconferma[] $pages
191 191
 	 * @return User[]
192 192
 	 */
193
-	private function getFailedBureaucrats( array $pages ) : array {
194
-		$ret = [];
193
+	private function getFailedBureaucrats ( array $pages ) : array {
194
+		$ret = [ ];
195 195
 		foreach ( $pages as $page ) {
196 196
 			$user = $page->getUser();
197 197
 			if ( $user->inGroup( 'bureaucrat' ) ) {
198
-				$ret[] = $user;
198
+				$ret[ ] = $user;
199 199
 			}
200 200
 		}
201 201
 		return $ret;
Please login to merge, or discard this patch.