Passed
Push — master ( 470b4b...fe0189 )
by Daimona
02:30
created
includes/Task/Subtask/ArchivePages.php 1 patch
Spacing   +14 added lines, -14 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
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	/**
15 15
 	 * @inheritDoc
16 16
 	 */
17
-	public function runInternal() : int {
17
+	public function runInternal () : int {
18 18
 		$pages = $this->getDataProvider()->getPagesToClose();
19 19
 
20 20
 		if ( !$pages ) {
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
 	 * @param PageRiconferma[] $pages
34 34
 	 * @see OpenUpdates::addToMainPage()
35 35
 	 */
36
-	protected function removeFromMainPage( array $pages ) {
36
+	protected function removeFromMainPage ( array $pages ) {
37 37
 		$this->getLogger()->info(
38 38
 			'Removing from main: ' . implode( ', ', $pages )
39 39
 		);
40 40
 
41 41
 		$mainPage = new Page( $this->getOpt( 'main-page-title' ) );
42
-		$remove = [];
42
+		$remove = [ ];
43 43
 		foreach ( $pages as $page ) {
44 44
 			// Order matters here. It's not guaranteed that there'll be a newline, but avoid
45 45
 			// regexps for that single character.
46
-			$remove[] = '{{' . $page->getTitle() . "}}\n";
47
-			$remove[] = '{{' . $page->getTitle() . '}}';
46
+			$remove[ ] = '{{' . $page->getTitle() . "}}\n";
47
+			$remove[ ] = '{{' . $page->getTitle() . '}}';
48 48
 		}
49 49
 
50 50
 		$newContent = str_replace( $remove, '', $mainPage->getContent() );
@@ -73,17 +73,17 @@  discard block
 block discarded – undo
73 73
 	 *
74 74
 	 * @param PageRiconferma[] $pages
75 75
 	 */
76
-	protected function addToArchive( array $pages ) {
76
+	protected function addToArchive ( array $pages ) {
77 77
 		$this->getLogger()->info(
78 78
 			'Adding to archive: ' . implode( ', ', $pages )
79 79
 		);
80 80
 
81
-		$simple = $votes = [];
81
+		$simple = $votes = [ ];
82 82
 		foreach ( $pages as $page ) {
83 83
 			if ( $page->isVote() ) {
84
-				$votes[] = $page;
84
+				$votes[ ] = $page;
85 85
 			} else {
86
-				$simple[] = $page;
86
+				$simple[ ] = $page;
87 87
 			}
88 88
 		}
89 89
 
@@ -104,15 +104,15 @@  discard block
 block discarded – undo
104 104
 	 * @param string $archiveTitle
105 105
 	 * @param array $pages
106 106
 	 */
107
-	private function reallyAddToArchive( string $archiveTitle, array $pages ) {
107
+	private function reallyAddToArchive ( string $archiveTitle, array $pages ) {
108 108
 		$archivePage = new Page( "$archiveTitle/" . date( 'Y' ) );
109 109
 		$exists = $archivePage->exists();
110 110
 
111 111
 		$append = "\n";
112
-		$archivedList = [];
112
+		$archivedList = [ ];
113 113
 		foreach ( $pages as $page ) {
114 114
 			$append .= '{{' . $page->getTitle() . "}}\n";
115
-			$archivedList[] = $page->getUserNum();
115
+			$archivedList[ ] = $page->getUserNum();
116 116
 		}
117 117
 
118 118
 		$summary = $this->msg( 'close-archive-summary' )
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 *
134 134
 	 * @param string $archiveTitle
135 135
 	 */
136
-	private function addArchiveYear( string $archiveTitle ) {
136
+	private function addArchiveYear ( string $archiveTitle ) {
137 137
 		$page = new Page( $archiveTitle );
138 138
 		$year = date( 'Y' );
139 139
 
Please login to merge, or discard this patch.