Test Setup Failed
Push — master ( f0aa88...2fd8ac )
by
unknown
33:04 queued 11s
created
tests/phpunit/Integration/ArticleAnnotationTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	}
91 91
 
92 92
 	public function provideData() {
93
-		$data = [];
93
+		$data = [ ];
94 94
 
95 95
 		$xmlFileProvider = new XmlFileProvider( __DIR__ . '/../Fixture/articleAnnotation' );
96 96
 		$files = $xmlFileProvider->getFiles();
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 			$testCase = [
108 108
 				0 => substr( $file, strlen( __DIR__ . '/../Fixture/articleAnnotation' ) ),
109 109
 				1 => trim( $decoded[ 'text' ] ),
110
-				2 => [],
110
+				2 => [ ],
111 111
 				3 => trim( $decoded[ 'expected' ] ) . "\n",
112 112
 			];
113 113
 
@@ -116,12 +116,12 @@  discard block
 block discarded – undo
116 116
 			}
117 117
 
118 118
 			foreach ( $decoded[ 'glossary-entry' ] as $entry ) {
119
-				$testCase[ 2 ][] = [ $entry[ 'term' ], $entry[ 'definition' ], $entry[ 'link' ], $entry[ 'style' ] ];
119
+				$testCase[ 2 ][ ] = [ $entry[ 'term' ], $entry[ 'definition' ], $entry[ 'link' ], $entry[ 'style' ] ];
120 120
 			}
121 121
 
122 122
 			\Wikimedia\restoreWarnings();
123 123
 
124
-			$data[] = $testCase;
124
+			$data[ ] = $testCase;
125 125
 		}
126 126
 
127 127
 		return $data;
Please login to merge, or discard this patch.
src/LingoParser.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 				} else {
155 155
 
156 156
 					wfDebug( "Cache miss: Lingo tree not found in cache.\n" );
157
-					$this->mLingoTree =& $this->buildLingo();
157
+					$this->mLingoTree = & $this->buildLingo();
158 158
 					wfDebug( "Cached lingo tree.\n" );
159 159
 				}
160 160
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
 			} else {
167 167
 				wfDebug( "Caching of lingo tree disabled.\n" );
168
-				$this->mLingoTree =& $this->buildLingo();
168
+				$this->mLingoTree = & $this->buildLingo();
169 169
 			}
170 170
 
171 171
 		}
@@ -201,10 +201,10 @@  discard block
 block discarded – undo
201 201
 		// Parse text identical to options used in includes/api/ApiParse.php
202 202
 		$params = $this->mApiParams;
203 203
 		$text = is_null( $params ) ? $parser->getOutput()->getText() : $parser->getOutput()->getText( [
204
-			'allowTOC' => !$params['disabletoc'],
205
-			'enableSectionEditLinks' => !$params['disableeditsection'],
206
-			'wrapperDivClass' => $params['wrapoutputclass'],
207
-			'deduplicateStyles' => !$params['disablestylededuplication'],
204
+			'allowTOC' => !$params[ 'disabletoc' ],
205
+			'enableSectionEditLinks' => !$params[ 'disableeditsection' ],
206
+			'wrapperDivClass' => $params[ 'wrapoutputclass' ],
207
+			'deduplicateStyles' => !$params[ 'disablestylededuplication' ],
208 208
 		] );
209 209
 
210 210
 		if ( $text === null || $text === '' ) {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 		// Iterate all HTML text matches
236 236
 		$numberOfTextElements = $textElements->length;
237 237
 
238
-		$definitions = [];
238
+		$definitions = [ ];
239 239
 
240 240
 		for ( $textElementIndex = 0; $textElementIndex < $numberOfTextElements; $textElementIndex++ ) {
241 241
 			$textElement = $textElements->item( $textElementIndex );
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 				continue;
245 245
 			}
246 246
 
247
-			$matches = [];
247
+			$matches = [ ];
248 248
 			preg_match_all(
249 249
 				$this->regex,
250 250
 				$textElement->nodeValue,
Please login to merge, or discard this patch.
src/Lingo.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,28 +42,28 @@  discard block
 block discarded – undo
42 42
 	 * @since 2.0.2
43 43
 	 */
44 44
 	public static function initExtension() {
45
-		$GLOBALS[ 'wgExtensionFunctions' ][] = function () {
45
+		$GLOBALS[ 'wgExtensionFunctions' ][ ] = function() {
46 46
 			$parser = LingoParser::getInstance();
47 47
 
48 48
 			$backend = new $GLOBALS[ 'wgexLingoBackend' ]();
49 49
 
50 50
 			$parser->setBackend( $backend );
51 51
 
52
-			\Hooks::register( 'ContentAlterParserOutput', function () use ( $parser ){
52
+			\Hooks::register( 'ContentAlterParserOutput', function() use ( $parser ){
53 53
 				$parser->parse( $GLOBALS[ 'wgParser' ] );
54 54
 			} );
55 55
 
56
-			\Hooks::register( 'ApiMakeParserOptions', function ( \ParserOptions $popts, \Title $title, array $params ) use ( $parser ){
56
+			\Hooks::register( 'ApiMakeParserOptions', function( \ParserOptions $popts, \Title $title, array $params ) use ( $parser ){
57 57
 				$parser->setApiParams( $params );
58 58
 			} );
59 59
 
60
-			\Hooks::register( 'GetDoubleUnderscoreIDs', function ( array &$doubleUnderscoreIDs ) {
61
-				$doubleUnderscoreIDs[] = 'noglossary';
60
+			\Hooks::register( 'GetDoubleUnderscoreIDs', function( array &$doubleUnderscoreIDs ) {
61
+				$doubleUnderscoreIDs[ ] = 'noglossary';
62 62
 				return true;
63 63
 			} );
64 64
 
65
-			\Hooks::register( 'ParserFirstCallInit', function ( \Parser $parser ) {
66
-				$parser->setHook( 'noglossary', function ( $input, array $args, \Parser $parser, \PPFrame $frame ) {
65
+			\Hooks::register( 'ParserFirstCallInit', function( \Parser $parser ) {
66
+				$parser->setHook( 'noglossary', function( $input, array $args, \Parser $parser, \PPFrame $frame ) {
67 67
 					$output = $parser->recursiveTagParse( $input, $frame );
68 68
 					return '<span class="noglossary">' . $output . '</span>';
69 69
 				} );
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 				return true;
72 72
 			} );
73 73
 
74
-			\Hooks::register( 'SpecialPageBeforeExecute', function ( \SpecialPage $specialPage, $subPage ) {
74
+			\Hooks::register( 'SpecialPageBeforeExecute', function( \SpecialPage $specialPage, $subPage ) {
75 75
 				if ( $specialPage instanceof \SpecialVersion ) {
76 76
 					foreach ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ] as $index => $description ) {
77 77
 						if ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ][ $index ][ 'name' ] === 'Lingo' ) {
Please login to merge, or discard this patch.