Passed
Push — master ( 1dba3f...853cce )
by Daimona
02:02
created
includes/Task/Subtask/SimpleUpdates.php 1 patch
Spacing   +20 added lines, -20 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 SimpleUpdates' );
18 18
 
19 19
 		$pages = $this->getDataProvider()->getPagesToClose();
@@ -30,15 +30,15 @@  discard block
 block discarded – undo
30 30
 	 * @param PageRiconferma[] $pages
31 31
 	 * @see UpdatesAround::addVote()
32 32
 	 */
33
-	protected function updateVote( array $pages ) {
33
+	protected function updateVote ( array $pages ) {
34 34
 		$this->getLogger()->info(
35 35
 			'Updating votazioni: ' . implode( ', ', array_map( 'strval', $pages ) )
36 36
 		);
37 37
 		$votePage = new Page( $this->getConfig()->get( 'ric-vote-page' ) );
38 38
 
39
-		$titles = [];
39
+		$titles = [ ];
40 40
 		foreach ( $pages as $page ) {
41
-			$titles[] = preg_quote( $page->getTitle() );
41
+			$titles[ ] = preg_quote( $page->getTitle() );
42 42
 		}
43 43
 
44 44
 		$titleReg = implode( '|', $titles );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	 * @param array $pages
68 68
 	 * @see UpdatesAround::addNews()
69 69
 	 */
70
-	protected function updateNews( array $pages ) {
70
+	protected function updateNews ( array $pages ) {
71 71
 		$simpleAmount = $voteAmount = 0;
72 72
 		foreach ( $pages as $page ) {
73 73
 			if ( $page->isVote() ) {
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 		$simpleMatches = $newsPage->getMatch( $simpleReg );
91 91
 		$voteMatches = $newsPage->getMatch( $voteReg );
92 92
 
93
-		$newSimp = (int)$simpleMatches[2] - $simpleAmount ?: '';
94
-		$newVote = (int)$voteMatches[2] - $voteAmount ?: '';
93
+		$newSimp = (int)$simpleMatches[ 2 ] - $simpleAmount ?: '';
94
+		$newVote = (int)$voteMatches[ 2 ] - $voteAmount ?: '';
95 95
 		$newContent = preg_replace( $simpleReg, '${1}' . $newSimp, $content );
96 96
 		$newContent = preg_replace( $voteReg, '${1}' . $newVote, $newContent );
97 97
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 *
110 110
 	 * @param PageRiconferma[] $pages
111 111
 	 */
112
-	protected function updateAdminList( array $pages ) {
112
+	protected function updateAdminList ( array $pages ) {
113 113
 		$this->getLogger()->info(
114 114
 			'Updating admin list: ' . implode( ', ', array_map( 'strval', $pages ) )
115 115
 		);
@@ -117,17 +117,17 @@  discard block
 block discarded – undo
117 117
 		$newContent = $adminsPage->getContent();
118 118
 		$newDate = date( 'Ymd', strtotime( '+1 year' ) );
119 119
 
120
-		$riconfNames = $removeNames = [];
120
+		$riconfNames = $removeNames = [ ];
121 121
 		foreach ( $pages as $page ) {
122 122
 			$user = $page->getUser();
123 123
 			$reg = "!(\{\{Amministratore\/riga\|$user.+\| *)\d+( *\|(?: *pausa)? *\}\}\n)!";
124 124
 			if ( $page->getOutcome() & PageRiconferma::OUTCOME_FAIL ) {
125 125
 				// Remove the line
126 126
 				$newContent = preg_replace( $reg, '', $newContent );
127
-				$removeNames[] = $user;
127
+				$removeNames[ ] = $user;
128 128
 			} else {
129 129
 				$newContent = preg_replace( $reg, '$1' . $newDate . '$2', $newContent );
130
-				$riconfNames[] = $user;
130
+				$riconfNames[ ] = $user;
131 131
 			}
132 132
 		}
133 133
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 			$lastUser = array_pop( $riconfNames );
136 136
 			$riconfList = implode( ', ', $riconfNames ) . " e $lastUser";
137 137
 		} elseif ( $riconfNames ) {
138
-			$riconfList = $riconfNames[0];
138
+			$riconfList = $riconfNames[ 0 ];
139 139
 		} else {
140 140
 			$riconfList = 'nessuno';
141 141
 		}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			$lastUser = array_pop( $removeNames );
145 145
 			$removeList = implode( ', ', $removeNames ) . " e $lastUser";
146 146
 		} elseif ( $removeNames ) {
147
-			$removeList = $removeNames[0];
147
+			$removeList = $removeNames[ 0 ];
148 148
 		} else {
149 149
 			$removeList = 'nessuno';
150 150
 		}
@@ -165,13 +165,13 @@  discard block
 block discarded – undo
165 165
 	/**
166 166
 	 * @param PageRiconferma[] $pages
167 167
 	 */
168
-	protected function updateCUList( array $pages ) {
168
+	protected function updateCUList ( array $pages ) {
169 169
 		$this->getLogger()->info( 'Checking if CU list needs updating.' );
170 170
 		$cuList = new Page( $this->getConfig()->get( 'cu-list-title' ) );
171 171
 		$admins = $this->getDataProvider()->getUsersList();
172 172
 		$newContent = $cuList->getContent();
173 173
 
174
-		$riconfNames = $removeNames = [];
174
+		$riconfNames = $removeNames = [ ];
175 175
 		foreach ( $pages as $page ) {
176 176
 			$user = $page->getUser();
177 177
 			if ( array_key_exists( 'checkuser', $admins[ $user ] ) ) {
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
 				if ( $page->getOutcome() & PageRiconferma::OUTCOME_FAIL ) {
180 180
 					// Remove the line
181 181
 					$newContent = preg_replace( $reg, '', $newContent );
182
-					$removeNames[] = $user;
182
+					$removeNames[ ] = $user;
183 183
 				} else {
184 184
 					$newContent = preg_replace( $reg, '$1{{subst:#time:j F Y}}$2', $newContent );
185
-					$riconfNames[] = $user;
185
+					$riconfNames[ ] = $user;
186 186
 				}
187 187
 			}
188 188
 		}
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 			$lastUser = array_pop( $riconfNames );
200 200
 			$riconfList = implode( ', ', $riconfNames ) . " e $lastUser";
201 201
 		} elseif ( $riconfNames ) {
202
-			$riconfList = $riconfNames[0];
202
+			$riconfList = $riconfNames[ 0 ];
203 203
 		} else {
204 204
 			$riconfList = 'nessuno';
205 205
 		}
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 			$lastUser = array_pop( $removeNames );
209 209
 			$removeList = implode( ', ', $removeNames ) . " e $lastUser";
210 210
 		} elseif ( $removeNames ) {
211
-			$removeList = $removeNames[0];
211
+			$removeList = $removeNames[ 0 ];
212 212
 		} else {
213 213
 			$removeList = 'nessuno';
214 214
 		}
Please login to merge, or discard this patch.
includes/Task/Subtask/UpdatesAround.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -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
 		$this->getLogger()->info( 'Starting task UpdatesAround' );
20 20
 
21 21
 		$pages = $this->getDataProvider()->getCreatedPages();
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @param PageRiconferma[] $pages
41 41
 	 */
42
-	protected function addToMainPage( array $pages ) {
42
+	protected function addToMainPage ( array $pages ) {
43 43
 		$this->getLogger()->info(
44 44
 			'Adding the following to main: ' . implode( ', ', array_map( 'strval', $pages ) )
45 45
 		);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 *
67 67
 	 * @param PageRiconferma[] $pages
68 68
 	 */
69
-	protected function addVote( array $pages ) {
69
+	protected function addVote ( array $pages ) {
70 70
 		$this->getLogger()->info(
71 71
 			'Adding the following to votes: ' . implode( ', ', array_map( 'strval', $pages ) )
72 72
 		);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			$beforeReg = '!INSERIRE LA NOTIZIA PIÙ NUOVA IN CIMA.+!m';
96 96
 			// Replace semicolon with full stop
97 97
 			$newLines = substr( $newLines, 0, -2 ) . ".\n";
98
-			$newContent = preg_replace( $beforeReg, '$0' . "\n{$matches[0]}\n$newLines", $content, 1 );
98
+			$newContent = preg_replace( $beforeReg, '$0' . "\n{$matches[ 0 ]}\n$newLines", $content, 1 );
99 99
 		}
100 100
 
101 101
 		$summary = $this->msg( 'ric-vote-page-summary' )
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 *
115 115
 	 * @param int $amount
116 116
 	 */
117
-	protected function addNews( int $amount ) {
117
+	protected function addNews ( int $amount ) {
118 118
 		$this->getLogger()->info( "Increasing the news counter by $amount" );
119 119
 		$newsPage = new Page( $this->getConfig()->get( 'ric-news-page' ) );
120 120
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 			throw new TaskException( 'Param not found in news page' );
128 128
 		}
129 129
 
130
-		$newNum = (int)$matches[2] + $amount;
130
+		$newNum = (int)$matches[ 2 ] + $amount;
131 131
 		$newContent = preg_replace( $reg, '${1}' . $newNum, $content );
132 132
 
133 133
 		$summary = $this->msg( 'ric-news-page-summary' )
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
 
@@ -15,15 +15,15 @@  discard block
 block discarded – undo
15 15
 	/**
16 16
 	 * @inheritDoc
17 17
 	 */
18
-	protected function getSubtasksMap(): array {
18
+	protected function getSubtasksMap (): array {
19 19
 		// Everything is done here.
20
-		return [];
20
+		return [ ];
21 21
 	}
22 22
 
23 23
 	/**
24 24
 	 * @inheritDoc
25 25
 	 */
26
-	public function run() : TaskResult {
26
+	public function run () : TaskResult {
27 27
 		$this->getLogger()->info( 'Starting task StartVote' );
28 28
 
29 29
 		$pages = $this->getDataProvider()->getOpenPages();
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
 	/**
42 42
 	 * @param PageRiconferma[] $pages
43 43
 	 */
44
-	protected function processPages( array $pages ) {
45
-		$actualPages = [];
44
+	protected function processPages ( array $pages ) {
45
+		$actualPages = [ ];
46 46
 		foreach ( $pages as $page ) {
47 47
 			if ( $page->hasOpposition() && !$page->isVote() ) {
48 48
 				$this->openVote( $page );
49
-				$actualPages[] = $page;
49
+				$actualPages[ ] = $page;
50 50
 			}
51 51
 		}
52 52
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @param PageRiconferma $page
65 65
 	 */
66
-	protected function openVote( PageRiconferma $page ) {
66
+	protected function openVote ( PageRiconferma $page ) {
67 67
 		$this->getLogger()->info( "Starting vote on $page" );
68 68
 
69 69
 		$content = $page->getContent();
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
 	 * @see SimpleUpdates::updateVote()
103 103
 	 * @see UpdatesAround::addVote()
104 104
 	 */
105
-	protected function updateVotePage( array $pages ) {
105
+	protected function updateVotePage ( array $pages ) {
106 106
 		$votePage = new Page( $this->getConfig()->get( 'ric-vote-page' ) );
107 107
 		$content = $votePage->getContent();
108 108
 
109
-		$titles = [];
109
+		$titles = [ ];
110 110
 		foreach ( $pages as $page ) {
111
-			$titles[] = preg_quote( $page->getTitle() );
111
+			$titles[ ] = preg_quote( $page->getTitle() );
112 112
 		}
113 113
 		$titleReg = implode( '|', $titles );
114 114
 		$search = "!^\*.+ La \[\[($titleReg)\|procedura]] termina.+\n!gm";
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
 			$newContent = preg_replace( $introReg, '$0' . "\n$newLines", $newContent, 1 );
132 132
 		} else {
133 133
 			// Start section
134
-			$matches = [];
134
+			$matches = [ ];
135 135
 			if ( preg_match( $introReg, $newContent, $matches ) === false ) {
136 136
 				throw new TaskException( 'Intro not found in vote page' );
137 137
 			}
138 138
 			$beforeReg = '!INSERIRE LA NOTIZIA PIÙ NUOVA IN CIMA.+!m';
139 139
 			// Replace semicolon with full stop
140 140
 			$newLines = substr( $newLines, 0, -2 ) . ".\n";
141
-			$newContent = preg_replace( $beforeReg, '$0' . "\n{$matches[0]}\n$newLines", $newContent, 1 );
141
+			$newContent = preg_replace( $beforeReg, '$0' . "\n{$matches[ 0 ]}\n$newLines", $newContent, 1 );
142 142
 		}
143 143
 
144 144
 		$summary = $this->msg( 'vote-start-vote-page-summary' )
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 * @see UpdatesAround::addNews()
161 161
 	 * @see SimpleUpdates::updateNews()
162 162
 	 */
163
-	protected function updateNews( int $amount ) {
163
+	protected function updateNews ( int $amount ) {
164 164
 		$this->getLogger()->info( "Turning $amount pages into votes" );
165 165
 		$newsPage = new Page( $this->getConfig()->get( 'ric-news-page' ) );
166 166
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		$regTac = '!(\| *riconferme[ _]tacite[ _]amministratori *= *)(\d+)!';
169 169
 		$regVot = '!(\| *riconferme[ _]voto[ _]amministratori *= *)(\d+)!';
170 170
 
171
-		$tacMatches = $votMatches = [];
171
+		$tacMatches = $votMatches = [ ];
172 172
 		if ( preg_match( $regTac, $content, $tacMatches ) === false ) {
173 173
 			throw new TaskException( 'Param "tacite" not found in news page' );
174 174
 		}
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
 			throw new TaskException( 'Param "voto" not found in news page' );
177 177
 		}
178 178
 
179
-		$newTac = (int)$tacMatches[2] - $amount ?: '';
180
-		$newVot = (int)$votMatches[2] + $amount ?: '';
179
+		$newTac = (int)$tacMatches[ 2 ] - $amount ?: '';
180
+		$newVot = (int)$votMatches[ 2 ] + $amount ?: '';
181 181
 
182 182
 		$newContent = preg_replace( $regTac, '${1}' . $newTac, $content );
183 183
 		$newContent = preg_replace( $regVot, '${1}' . $newVot, $newContent );
Please login to merge, or discard this patch.
includes/Page/Page.php 1 patch
Spacing   +13 added lines, -13 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\Page;
4 4
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	 * @param string $title
21 21
 	 * @param string $domain The site where the page lives, if different from default
22 22
 	 */
23
-	public function __construct( string $title, string $domain = DEFAULT_URL ) {
23
+	public function __construct ( string $title, string $domain = DEFAULT_URL ) {
24 24
 		$this->title = $title;
25 25
 		$this->controller = new WikiController( $domain );
26 26
 	}
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	/**
29 29
 	 * @return string
30 30
 	 */
31
-	public function getTitle() : string {
31
+	public function getTitle () : string {
32 32
 		return $this->title;
33 33
 	}
34 34
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 * @param int|null $section A section number to retrieve the content of that section
39 39
 	 * @return string
40 40
 	 */
41
-	public function getContent( int $section = null ) : string {
41
+	public function getContent ( int $section = null ) : string {
42 42
 		if ( $this->content === null ) {
43 43
 			$this->content = $this->controller->getPageContent( $this->title, $section );
44 44
 		}
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
 	 *
51 51
 	 * @param array $params
52 52
 	 */
53
-	public function edit( array $params ) {
53
+	public function edit ( array $params ) {
54 54
 		$params = [
55 55
 			'title' => $this->getTitle()
56 56
 		] + $params;
57 57
 
58 58
 		$this->controller->editPage( $params );
59
-		if ( isset( $params['text'] ) ) {
60
-			$this->content = $params['text'];
61
-		} elseif ( isset( $params['appendtext'] ) ) {
62
-			$this->content .= $params['appendtext'];
59
+		if ( isset( $params[ 'text' ] ) ) {
60
+			$this->content = $params[ 'text' ];
61
+		} elseif ( isset( $params[ 'appendtext' ] ) ) {
62
+			$this->content .= $params[ 'appendtext' ];
63 63
 		} else {
64 64
 			// Clear the cache anyway
65 65
 			( new Logger )->warning( 'Resetting content cache. Params: ' . var_export( $params, true ) );
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 * @param string $regex
74 74
 	 * @return bool
75 75
 	 */
76
-	public function matches( string $regex ) : bool {
76
+	public function matches ( string $regex ) : bool {
77 77
 		return preg_match( $regex, $this->getContent() ) !== false;
78 78
 	}
79 79
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 * @return string[]
86 86
 	 * @throws \Exception
87 87
 	 */
88
-	public function getMatch( string $regex ) : array {
89
-		$ret = [];
88
+	public function getMatch ( string $regex ) : array {
89
+		$ret = [ ];
90 90
 		if ( preg_match( $regex, $this->getContent(), $ret ) === false ) {
91 91
 			throw new \Exception;
92 92
 		}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 *
99 99
 	 * @return string
100 100
 	 */
101
-	public function __toString() {
101
+	public function __toString () {
102 102
 		return $this->getTitle();
103 103
 	}
104 104
 }
Please login to merge, or discard this patch.
includes/Page/PageRiconferma.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\Page;
4 4
 
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	 *
24 24
 	 * @return string
25 25
 	 */
26
-	public function getUser() : string {
27
-		return explode( '/', $this->title )[2];
26
+	public function getUser () : string {
27
+		return explode( '/', $this->title )[ 2 ];
28 28
 	}
29 29
 
30 30
 	/**
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 *
33 33
 	 * @return int
34 34
 	 */
35
-	public function getNum() : int {
35
+	public function getNum () : int {
36 36
 		$bits = explode( '/', $this->getTitle() );
37 37
 		return intval( end( $bits ) );
38 38
 	}
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 	 *
43 43
 	 * @return string
44 44
 	 */
45
-	public function getUserNum() : string {
46
-		return explode( '/', $this->getTitle(), 3 )[2];
45
+	public function getUserNum () : string {
46
+		return explode( '/', $this->getTitle(), 3 )[ 2 ];
47 47
 	}
48 48
 
49 49
 	/**
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 *
52 52
 	 * @return string
53 53
 	 */
54
-	public function getBaseTitle() : string {
54
+	public function getBaseTitle () : string {
55 55
 		// @phan-suppress-next-line PhanTypeMismatchArgumentInternal Phan bug
56 56
 		return substr( $this->getTitle(), 0, strrpos( $this->getTitle(), '/' ) );
57 57
 	}
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 *
62 62
 	 * @return int
63 63
 	 */
64
-	public function getOpposingCount() : int {
64
+	public function getOpposingCount () : int {
65 65
 		return $this->getCountForSection( self::SECTION_OPPOSE );
66 66
 	}
67 67
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 *
71 71
 	 * @return int
72 72
 	 */
73
-	public function getSupportCount() : int {
73
+	public function getSupportCount () : int {
74 74
 		return $this->getCountForSection( self::SECTION_SUPPORT );
75 75
 	}
76 76
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @param int $secNum
81 81
 	 * @return int
82 82
 	 */
83
-	protected function getCountForSection( int $secNum ) : int {
83
+	protected function getCountForSection ( int $secNum ) : int {
84 84
 		$content = $this->controller->getPageContent( $this->title, $secNum );
85 85
 		// Let's hope that this is good enough...
86 86
 		return substr_count( $content, "\n\# *(?![#*])" );
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
 	 *
92 92
 	 * @return int
93 93
 	 */
94
-	protected function getQuorum() : int {
94
+	protected function getQuorum () : int {
95 95
 		$reg = "!soddisfare il \[\[[^|\]]+\|quorum]] di '''(\d+) voti'''!";
96
-		return intval( $this->getMatch( $reg )[1] );
96
+		return intval( $this->getMatch( $reg )[ 1 ] );
97 97
 	}
98 98
 
99 99
 	/**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 *
102 102
 	 * @return bool
103 103
 	 */
104
-	public function hasOpposition() : bool {
104
+	public function hasOpposition () : bool {
105 105
 		return $this->getOpposingCount() >= 15;
106 106
 	}
107 107
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @return int One of the OUTCOME_* constants
112 112
 	 * @throws \BadMethodCallException
113 113
 	 */
114
-	public function getOutcome() : int {
114
+	public function getOutcome () : int {
115 115
 		if ( !$this->isVote() ) {
116 116
 			throw new \BadMethodCallException( 'Cannot get outcome for a non-vote page.' );
117 117
 		}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 * @throws \BadMethodCallException
132 132
 	 * @throws \LogicException
133 133
 	 */
134
-	public function getOutcomeText() : string {
134
+	public function getOutcomeText () : string {
135 135
 		if ( !$this->isVote() ) {
136 136
 			throw new \BadMethodCallException( 'No need for an outcome text.' );
137 137
 		}
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 *
166 166
 	 * @return bool
167 167
 	 */
168
-	public function isVote() : bool {
168
+	public function isVote () : bool {
169 169
 		$sectionReg = '/<!-- SEZIONE DA UTILIZZARE PER/';
170 170
 		return $this->matches( $sectionReg );
171 171
 	}
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 *
176 176
 	 * @return int
177 177
 	 */
178
-	public function getEndTimestamp() : int {
178
+	public function getEndTimestamp () : int {
179 179
 		if ( $this->isVote() ) {
180 180
 			$reg = "!La votazione ha inizio il.+ e ha termine.+ '''([^']+)''' alle ore '''([^']+)'''!";
181 181
 			list( , $day, $hours ) = $this->getMatch( $reg );
Please login to merge, or discard this patch.