Passed
Push — master ( d87f68...1a004e )
by Daimona
01:57
created
includes/Task/Subtask/ClosePages.php 1 patch
Spacing   +5 added lines, -6 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 runInternal() : int {
16
+	public function runInternal () : int {
17 17
 		$pages = $this->getDataProvider()->getPagesToClose();
18 18
 
19 19
 		if ( !$pages ) {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	/**
36 36
 	 * @param PageRiconferma $page
37 37
 	 */
38
-	protected function addVoteCloseText( PageRiconferma $page ) : void {
38
+	protected function addVoteCloseText ( PageRiconferma $page ) : void {
39 39
 		$content = $page->getContent();
40 40
 		$beforeReg = '!è necessario ottenere una maggioranza .+ votanti\.!u';
41 41
 		$newContent = preg_replace( $beforeReg, '$0' . "\n" . $page->getOutcomeText(), $content );
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * @param PageRiconferma $page
51 51
 	 * @see CreatePages::updateBasePage()
52 52
 	 */
53
-	protected function updateBasePage( PageRiconferma $page ) : void {
53
+	protected function updateBasePage ( PageRiconferma $page ) : void {
54 54
 		$this->getLogger()->info( "Updating base page for $page" );
55 55
 
56 56
 		if ( $page->getNum() === 1 ) {
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
 		$current = $basePage->getContent();
63 63
 
64 64
 		$outcomeText = ( $page->getOutcome() & PageRiconferma::OUTCOME_FAIL ) ?
65
-			'non riconfermato' :
66
-			'riconfermato';
65
+			'non riconfermato' : 'riconfermato';
67 66
 		$text = $page->isVote() ? "votazione di riconferma: $outcomeText" : 'riconferma tacita';
68 67
 
69 68
 		$newContent = preg_replace( '/^(#: *)(votazione di )?riconferma in corso/m', '$1' . $text, $current );
Please login to merge, or discard this patch.