Passed
Push — master ( bead6a...6dc797 )
by
unknown
04:30
created
tests/phpunit/Unit/LingoParserTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
 		'mwTitleExpectsGetNamespace' => null,
46 46
 		'mwOutputExpectsGetText' => null,
47 47
 
48
-		'mwParserProperties' => [],
48
+		'mwParserProperties' => [ ],
49 49
 
50 50
 		'namespace' => 0,
51 51
 		'text' => null,
52 52
 
53
-		'wgexLingoUseNamespaces' => [],
53
+		'wgexLingoUseNamespaces' => [ ],
54 54
 	];
55 55
 
56 56
 	/**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	/**
138 138
 	 * @return \PHPUnit_Framework_MockObject_MockObject
139 139
 	 */
140
-	protected function getParserMock( $config = [] ) {
140
+	protected function getParserMock( $config = [ ] ) {
141 141
 
142 142
 		$config += self::$defaultParserConfig;
143 143
 
@@ -156,15 +156,15 @@  discard block
 block discarded – undo
156 156
 			->getMock();
157 157
 
158 158
 
159
-		$mwParserOutput->expects( $config[ 'mwOutputExpectsGetText' ]?:$this->any() )
159
+		$mwParserOutput->expects( $config[ 'mwOutputExpectsGetText' ] ?: $this->any() )
160 160
 			->method( 'getText' )
161 161
 			->willReturn( $config[ 'text' ] );
162 162
 
163
-		$mwParser->expects( $config[ 'mwParserExpectsGetTitle' ]?:$this->any() )
163
+		$mwParser->expects( $config[ 'mwParserExpectsGetTitle' ] ?: $this->any() )
164 164
 			->method( 'getTitle' )
165 165
 			->willReturn( $mwTitle );
166 166
 
167
-		$mwParser->expects( $config[ 'mwParserExpectsGetOutput' ]?:$this->any() )
167
+		$mwParser->expects( $config[ 'mwParserExpectsGetOutput' ] ?: $this->any() )
168 168
 			->method( 'getOutput' )
169 169
 			->willReturn( $mwParserOutput );
170 170
 
Please login to merge, or discard this patch.
src/Lingo.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,24 +42,24 @@  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( 'GetDoubleUnderscoreIDs', function ( array &$doubleUnderscoreIDs ) {
57
-				$doubleUnderscoreIDs[] = 'noglossary';
56
+			\Hooks::register( 'GetDoubleUnderscoreIDs', function( array &$doubleUnderscoreIDs ) {
57
+				$doubleUnderscoreIDs[ ] = 'noglossary';
58 58
 				return true;
59 59
 			} );
60 60
 
61
-			\Hooks::register( 'ParserFirstCallInit', function ( \Parser $parser ) {
62
-				$parser->setHook( 'noglossary', function ( $input, array $args, \Parser $parser, \PPFrame $frame ) {
61
+			\Hooks::register( 'ParserFirstCallInit', function( \Parser $parser ) {
62
+				$parser->setHook( 'noglossary', function( $input, array $args, \Parser $parser, \PPFrame $frame ) {
63 63
 					$output = $parser->recursiveTagParse( $input, $frame );
64 64
 					return '<span class="noglossary">' . $output . '</span>';
65 65
 				} );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 				return true;
68 68
 			} );
69 69
 
70
-			\Hooks::register( 'SpecialPageBeforeExecute', function ( \SpecialPage $specialPage, $subPage ) {
70
+			\Hooks::register( 'SpecialPageBeforeExecute', function( \SpecialPage $specialPage, $subPage ) {
71 71
 				if ( $specialPage instanceof \SpecialVersion ) {
72 72
 					foreach ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ] as $index => $description ) {
73 73
 						if ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ][ $index ][ 'name' ] === 'Lingo' ) {
Please login to merge, or discard this patch.