@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | } else { |
| 157 | 157 | |
| 158 | 158 | wfDebug( "Cache miss: Lingo tree not found in cache.\n" ); |
| 159 | - $this->mLingoTree =& $this->buildLingo(); |
|
| 159 | + $this->mLingoTree = & $this->buildLingo(); |
|
| 160 | 160 | wfDebug( "Cached lingo tree.\n" ); |
| 161 | 161 | } |
| 162 | 162 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | } else { |
| 169 | 169 | wfDebug( "Caching of lingo tree disabled.\n" ); |
| 170 | - $this->mLingoTree =& $this->buildLingo(); |
|
| 170 | + $this->mLingoTree = & $this->buildLingo(); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | } |
@@ -203,10 +203,10 @@ discard block |
||
| 203 | 203 | // Parse text identical to options used in includes/api/ApiParse.php |
| 204 | 204 | $params = $this->mApiParams; |
| 205 | 205 | $text = is_null( $params ) ? $parser->getOutput()->getText() : $parser->getOutput()->getText( [ |
| 206 | - 'allowTOC' => !$params['disabletoc'], |
|
| 207 | - 'enableSectionEditLinks' => !$params['disableeditsection'], |
|
| 208 | - 'wrapperDivClass' => $params['wrapoutputclass'], |
|
| 209 | - 'deduplicateStyles' => !$params['disablestylededuplication'], |
|
| 206 | + 'allowTOC' => !$params[ 'disabletoc' ], |
|
| 207 | + 'enableSectionEditLinks' => !$params[ 'disableeditsection' ], |
|
| 208 | + 'wrapperDivClass' => $params[ 'wrapoutputclass' ], |
|
| 209 | + 'deduplicateStyles' => !$params[ 'disablestylededuplication' ], |
|
| 210 | 210 | ] ); |
| 211 | 211 | |
| 212 | 212 | if ( $text === null || $text === '' ) { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | // TODO: Remove call to \MediaWiki\suppressWarnings() for MW 1.34+. |
| 226 | 226 | // \Wikimedia\AtEase\AtEase::suppressWarnings() is available from MW 1.34. |
| 227 | - if (method_exists( AtEase::class, 'suppressWarnings' ) ) { |
|
| 227 | + if ( method_exists( AtEase::class, 'suppressWarnings' ) ) { |
|
| 228 | 228 | \Wikimedia\AtEase\AtEase::suppressWarnings(); |
| 229 | 229 | } else { |
| 230 | 230 | \MediaWiki\suppressWarnings(); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | // TODO: Remove call to \MediaWiki\restoreWarnings() for MW 1.34+. |
| 237 | 237 | // \Wikimedia\AtEase\AtEase::restoreWarnings() is available from MW 1.34. |
| 238 | - if (method_exists( AtEase::class, 'suppressWarnings' ) ) { |
|
| 238 | + if ( method_exists( AtEase::class, 'suppressWarnings' ) ) { |
|
| 239 | 239 | \Wikimedia\AtEase\AtEase::restoreWarnings(); |
| 240 | 240 | } else { |
| 241 | 241 | \MediaWiki\restoreWarnings(); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | // Iterate all HTML text matches |
| 251 | 251 | $numberOfTextElements = $textElements->length; |
| 252 | 252 | |
| 253 | - $definitions = []; |
|
| 253 | + $definitions = [ ]; |
|
| 254 | 254 | |
| 255 | 255 | for ( $textElementIndex = 0; $textElementIndex < $numberOfTextElements; $textElementIndex++ ) { |
| 256 | 256 | $textElement = $textElements->item( $textElementIndex ); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | continue; |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | - $matches = []; |
|
| 262 | + $matches = [ ]; |
|
| 263 | 263 | preg_match_all( |
| 264 | 264 | $this->regex, |
| 265 | 265 | $textElement->nodeValue, |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | 'mwTitleExpectsGetNamespace' => null, |
| 50 | 50 | 'mwOutputExpectsGetText' => null, |
| 51 | 51 | |
| 52 | - 'mwParserProperties' => [], |
|
| 52 | + 'mwParserProperties' => [ ], |
|
| 53 | 53 | |
| 54 | 54 | 'namespace' => 0, |
| 55 | 55 | 'text' => null, |
| 56 | 56 | |
| 57 | - 'wgexLingoUseNamespaces' => [], |
|
| 57 | + 'wgexLingoUseNamespaces' => [ ], |
|
| 58 | 58 | 'wgexLingoBackend' => 'Lingo\\BasicBackend', |
| 59 | 59 | ]; |
| 60 | 60 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | /** |
| 168 | 168 | * @return MockObject |
| 169 | 169 | */ |
| 170 | - protected function getParserMock( $config = [] ) { |
|
| 170 | + protected function getParserMock( $config = [ ] ) { |
|
| 171 | 171 | if ( array_key_exists( 'mwParser', $config ) ) { |
| 172 | 172 | return $config[ 'mwParser' ]; |
| 173 | 173 | } |