Fixed spacing
authorumherirrender <umherirrender_de.wp@web.de>
Wed, 13 Aug 2014 17:59:03 +0000 (19:59 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Wed, 13 Aug 2014 20:14:56 +0000 (20:14 +0000)
- Added newline at end of files
- Added/Removed spaces around comma, parentheses and negation
- Added space after function word

Change-Id: I2dd338153aeb5f07702ba015945e95c7d0ae673b

includes/api/ApiModuleManager.php
tests/phpunit/includes/api/ApiModuleManagerTest.php
tests/phpunit/includes/content/JSONContentTest.php
tests/phpunit/includes/skins/SkinFactoryTest.php

index fdf3f02..f7d0ccf 100644 (file)
@@ -195,7 +195,7 @@ class ApiModuleManager extends ContextSource {
                        // create instance from factory
                        $instance = call_user_func( $factory, $this->mParent, $name );
 
-                       if ( ! $instance instanceof $class ) {
+                       if ( !$instance instanceof $class ) {
                                throw new MWException( "The factory function for module $name did not return an instance of $class!" );
                        }
                } else {
index 1ac9b9d..19c0a7d 100644 (file)
@@ -39,8 +39,8 @@ class ApiModuleManagerTest extends MediaWikiTestCase {
                                'logout',
                                'action',
                                'ApiLogout',
-                               function( ApiMain $main, $action ) {
-                                               return new ApiLogout( $main, $action );
+                               function ( ApiMain $main, $action ) {
+                                       return new ApiLogout( $main, $action );
                                },
                        ),
                );
@@ -80,7 +80,7 @@ class ApiModuleManagerTest extends MediaWikiTestCase {
                                        ),
                                        'logout' => array(
                                                'class' => 'ApiLogout',
-                                               'factory' => function( ApiMain $main, $action ) {
+                                               'factory' => function ( ApiMain $main, $action ) {
                                                        return new ApiLogout( $main, $action );
                                                },
                                        ),
@@ -113,9 +113,9 @@ class ApiModuleManagerTest extends MediaWikiTestCase {
                        ),
                        'logout' => array(
                                'class' => 'ApiLogout',
-                               'factory' => function( ApiMain $main, $action ) {
-                                               return new ApiLogout( $main, $action );
-                                       },
+                               'factory' => function ( ApiMain $main, $action ) {
+                                       return new ApiLogout( $main, $action );
+                               },
                        ),
                );
 
index ec74574..acfdc0e 100644 (file)
@@ -27,7 +27,7 @@ class JSONContentTest extends MediaWikiLangTestCase {
         * @dataProvider provideDataToEncode
         */
        public function testBeautifyUsesFormatJson( $data ) {
-               $obj = new JSONContent( FormatJson::encode( $data) );
+               $obj = new JSONContent( FormatJson::encode( $data ) );
                $this->assertEquals( FormatJson::encode( $data, true ), $obj->beautifyJSON() );
        }
 
@@ -46,7 +46,7 @@ class JSONContentTest extends MediaWikiLangTestCase {
         */
        public function testPreSaveTransform( $data ) {
                $obj = new JSONContent( FormatJson::encode( $data ) );
-               $newObj = $obj->preSaveTransform( $this->getMockTitle(), $this->getMockUser() , $this->getMockParserOptions() );
+               $newObj = $obj->preSaveTransform( $this->getMockTitle(), $this->getMockUser(), $this->getMockParserOptions() );
                $this->assertTrue( $newObj->equals( new JSONContent( FormatJson::encode( $data, true ) ) ) );
        }
 
@@ -112,5 +112,4 @@ class JSONContentTest extends MediaWikiLangTestCase {
                        ),
                );
        }
-
-}
\ No newline at end of file
+}
index 4497cba..7b7c7f8 100644 (file)
@@ -7,7 +7,7 @@ class SkinFactoryTest extends MediaWikiTestCase {
         */
        public function testRegister() {
                $factory = new SkinFactory();
-               $factory->register( 'fallback', 'Fallback', function() {
+               $factory->register( 'fallback', 'Fallback', function () {
                        return new SkinFallback();
                } );
                $this->assertTrue( true ); // No exception thrown