misc style fix
authorAntoine Musso <hashar@free.fr>
Thu, 20 Dec 2012 15:09:25 +0000 (16:09 +0100)
committerAntoine Musso <hashar@free.fr>
Thu, 20 Dec 2012 15:09:25 +0000 (16:09 +0100)
* makes booleans lower case
* add spaces before open braces

Change-Id: Id88884e08bc23d7730361ee91646f54f5e16920b

25 files changed:
includes/Block.php
includes/MagicWord.php
includes/Metadata.php
includes/OutputPage.php
includes/Preferences.php
includes/SiteConfiguration.php
includes/User.php
includes/actions/DeleteAction.php
includes/actions/EditAction.php
includes/actions/ProtectAction.php
includes/actions/RenderAction.php
includes/actions/ViewAction.php
includes/installer/Ibm_db2Installer.php
includes/media/DjVu.php
includes/profiler/Profiler.php
includes/upload/UploadFromChunks.php
maintenance/backupTextPass.inc
maintenance/fuzz-tester.php
maintenance/language/languages.inc
skins/Chick.php
skins/CologneBlue.php
skins/Modern.php
skins/Nostalgia.php
skins/Standard.php
skins/Vector.php

index e05b2ac..4c878b6 100644 (file)
@@ -69,7 +69,7 @@ class Block {
                        $timestamp = wfTimestampNow();
                }
 
-               if( count( func_get_args() ) > 0 ){
+               if( count( func_get_args() ) > 0 ) {
                        # Soon... :D
                        # wfDeprecated( __METHOD__ . " with arguments" );
                }
@@ -418,7 +418,7 @@ class Block {
         * @param  $row ResultWrapper row from the ipblocks table
         * @return Block
         */
-       public static function newFromRow( $row ){
+       public static function newFromRow( $row ) {
                $block = new Block;
                $block->initFromRow( $row );
                return $block;
@@ -510,7 +510,7 @@ class Block {
         * @param $db DatabaseBase
         * @return Array
         */
-       protected function getDatabaseArray( $db = null ){
+       protected function getDatabaseArray( $db = null ) {
                if( !$db ){
                        $db = wfGetDB( DB_SLAVE );
                }
@@ -1169,7 +1169,7 @@ class Block {
         * Set the target for this block, and update $this->type accordingly
         * @param $target Mixed
         */
-       public function setTarget( $target ){
+       public function setTarget( $target ) {
                list( $this->target, $this->type ) = self::parseTarget( $target );
        }
 
@@ -1177,7 +1177,7 @@ class Block {
         * Get the user who implemented this block
         * @return User|string Local User object or string for a foreign user
         */
-       public function getBlocker(){
+       public function getBlocker() {
                return $this->blocker;
        }
 
@@ -1185,7 +1185,7 @@ class Block {
         * Set the user who implemented (or will implement) this block
         * @param $user User|string Local User object or username string for foriegn users
         */
-       public function setBlocker( $user ){
+       public function setBlocker( $user ) {
                $this->blocker = $user;
        }
 }
index 6d2e1dc..357eae4 100644 (file)
@@ -577,7 +577,7 @@ class MagicWord {
         *
         * @return bool
         */
-       function getWasModified(){
+       function getWasModified() {
                return $this->mModified;
        }
 
@@ -594,7 +594,7 @@ class MagicWord {
         *
         * @return bool
         */
-       function replaceMultiple( $magicarr, $subject, &$result ){
+       function replaceMultiple( $magicarr, $subject, &$result ) {
                $search = array();
                $replace = array();
                foreach( $magicarr as $id => $replacement ){
index 0ca1539..15894a4 100644 (file)
@@ -150,7 +150,7 @@ abstract class RdfMetaData {
                }
        }
 
-       protected function getTerms( $url ){
+       protected function getTerms( $url ) {
                global $wgLicenseTerms;
 
                if( $wgLicenseTerms ){
index 868c786..c06b770 100644 (file)
@@ -428,7 +428,7 @@ class OutputPage extends ContextSource {
         * @param $type string
         * @return Array
         */
-       protected function filterModules( $modules, $position = null, $type = ResourceLoaderModule::TYPE_COMBINED ){
+       protected function filterModules( $modules, $position = null, $type = ResourceLoaderModule::TYPE_COMBINED ) {
                $resourceLoader = $this->getResourceLoader();
                $filteredModules = array();
                foreach( $modules as $val ){
@@ -1239,7 +1239,7 @@ class OutputPage extends ContextSource {
         * @param $type String ResourceLoaderModule TYPE_ constant
         * @return Int ResourceLoaderModule ORIGIN_ class constant
         */
-       public function getAllowedModules( $type ){
+       public function getAllowedModules( $type ) {
                if( $type == ResourceLoaderModule::TYPE_COMBINED ){
                        return min( array_values( $this->mAllowedModules ) );
                } else {
@@ -1254,7 +1254,7 @@ class OutputPage extends ContextSource {
         * @param  $type String ResourceLoaderModule TYPE_ constant
         * @param  $level Int ResourceLoaderModule class constant
         */
-       public function setAllowedModules( $type, $level ){
+       public function setAllowedModules( $type, $level ) {
                $this->mAllowedModules[$type] = $level;
        }
 
@@ -1263,7 +1263,7 @@ class OutputPage extends ContextSource {
         * @param  $type String
         * @param  $level Int ResourceLoaderModule class constant
         */
-       public function reduceAllowedModules( $type, $level ){
+       public function reduceAllowedModules( $type, $level ) {
                $this->mAllowedModules[$type] = min( $this->getAllowedModules($type), $level );
        }
 
index 9a10867..96d9e6d 100644 (file)
@@ -1326,7 +1326,7 @@ class Preferences {
         * @param $alldata
         * @return int
         */
-       static function filterIntval( $value, $alldata ){
+       static function filterIntval( $value, $alldata ) {
                return intval( $value );
        }
 
index 6a861d8..afe0cc7 100644 (file)
@@ -183,7 +183,7 @@ class SiteConfiguration {
         * @param $params Array: array of parameters.
         * @return Mixed the value of the setting requested.
         */
-       protected function getSetting( $settingName, $wiki, /*array*/ $params ){
+       protected function getSetting( $settingName, $wiki, /*array*/ $params ) {
                $retval = null;
                if( array_key_exists( $settingName, $this->settings ) ) {
                        $thisSetting =& $this->settings[$settingName];
@@ -395,7 +395,7 @@ class SiteConfiguration {
         * @param $wiki String
         * @return array
         */
-       protected function getWikiParams( $wiki ){
+       protected function getWikiParams( $wiki ) {
                static $default = array(
                        'suffix' => null,
                        'lang' => null,
@@ -434,7 +434,7 @@ class SiteConfiguration {
         * @param $wikiTags Array The tags assigned to the wiki.
         * @return array
         */
-       protected function mergeParams( $wiki, $suffix, /*array*/ $params, /*array*/ $wikiTags ){
+       protected function mergeParams( $wiki, $suffix, /*array*/ $params, /*array*/ $wikiTags ) {
                $ret = $this->getWikiParams( $wiki );
 
                if( is_null( $ret['suffix'] ) ) {
index 28ff630..91e75b5 100644 (file)
@@ -253,7 +253,7 @@ class User {
        /**
         * @return String
         */
-       function __toString(){
+       function __toString() {
                return $this->getName();
        }
 
@@ -2558,7 +2558,7 @@ class User {
         *
         * @return bool
         */
-       public function isAllowedAny( /*...*/ ){
+       public function isAllowedAny( /*...*/ ) {
                $permissions = func_get_args();
                foreach( $permissions as $permission ){
                        if( $this->isAllowed( $permission ) ){
@@ -2573,7 +2573,7 @@ class User {
         * @internal param $varargs string
         * @return bool True if the user is allowed to perform *all* of the given actions
         */
-       public function isAllowedAll( /*...*/ ){
+       public function isAllowedAll( /*...*/ ) {
                $permissions = func_get_args();
                foreach( $permissions as $permission ){
                        if( !$this->isAllowed( $permission ) ){
index 5a5a382..3cb24e6 100644 (file)
@@ -29,11 +29,11 @@ class DeleteAction extends FormlessAction {
                return 'delete';
        }
 
-       public function onView(){
+       public function onView() {
                return null;
        }
 
-       public function show(){
+       public function show() {
 
                $this->page->delete();
 
index 08a33f4..eb261fc 100644 (file)
@@ -29,11 +29,11 @@ class EditAction extends FormlessAction {
                return 'edit';
        }
 
-       public function onView(){
+       public function onView() {
                return null;
        }
 
-       public function show(){
+       public function show() {
                $page = $this->page;
                $request = $this->getRequest();
                $user = $this->getUser();
@@ -62,7 +62,7 @@ class SubmitAction extends EditAction {
                return 'submit';
        }
 
-       public function show(){
+       public function show() {
                if ( session_id() == '' ) {
                        // Send a cookie so anons get talk message notifications
                        wfSetupSession();
index f053ede..1b55a3c 100644 (file)
@@ -29,11 +29,11 @@ class ProtectAction extends FormlessAction {
                return 'protect';
        }
 
-       public function onView(){
+       public function onView() {
                return null;
        }
 
-       public function show(){
+       public function show() {
 
                $this->page->protect();
 
@@ -47,7 +47,7 @@ class UnprotectAction extends ProtectAction {
                return 'unprotect';
        }
 
-       public function show(){
+       public function show() {
 
                $this->page->unprotect();
 
index 80af79c..23cae6a 100644 (file)
@@ -29,11 +29,11 @@ class RenderAction extends FormlessAction {
                return 'render';
        }
 
-       public function onView(){
+       public function onView() {
                return null;
        }
 
-       public function show(){
+       public function show() {
 
                $this->page->render();
 
index d57585e..af5a674 100644 (file)
@@ -29,11 +29,11 @@ class ViewAction extends FormlessAction {
                return 'view';
        }
 
-       public function onView(){
+       public function onView() {
                return null;
        }
 
-       public function show(){
+       public function show() {
                $this->page->view();
        }
 
index ca9bdf4..bf19055 100644 (file)
@@ -47,7 +47,7 @@ class Ibm_db2Installer extends DatabaseInstaller {
         * Get the DB2 database extension name
         * @return string
         */
-       public function getName(){
+       public function getName() {
                return 'ibm_db2';
        }
 
index 84672e0..124db32 100644 (file)
@@ -322,7 +322,7 @@ class DjVuHandler extends ImageHandler {
                }
        }
 
-       function getPageText( $image, $page ){
+       function getPageText( $image, $page ) {
                $tree = $this->getMetaTree( $image, true );
                if ( !$tree ) {
                        return false;
index f6f2117..e3d22f8 100644 (file)
@@ -511,7 +511,7 @@ class Profiler {
        /**
         * Log the whole profiling data into the database.
         */
-       public function logData(){
+       public function logData() {
                global $wgProfilePerHost, $wgProfileToDatabase;
 
                # Do not log anything if database is readonly (bug 5375)
index 2b0128b..821f482 100644 (file)
@@ -161,7 +161,7 @@ class UploadFromChunks extends UploadFromFile {
         * @param $index
         * @return string
         */
-       function getVirtualChunkLocation( $index ){
+       function getVirtualChunkLocation( $index ) {
                return $this->repo->getVirtualUrl( 'temp' ) .
                                '/' .
                                $this->repo->getHashPath(
@@ -206,7 +206,7 @@ class UploadFromChunks extends UploadFromFile {
        /**
         * Update the chunk db table with the current status:
         */
-       private function updateChunkStatus(){
+       private function updateChunkStatus() {
                wfDebug( __METHOD__ . " update chunk status for {$this->mFileKey} offset:" .
                                        $this->getOffset() . ' inx:' . $this->getChunkIndex() . "\n" );
 
@@ -230,7 +230,7 @@ class UploadFromChunks extends UploadFromFile {
        /**
         * Get the chunk db state and populate update relevant local values
         */
-       private function getChunkStatus(){
+       private function getChunkStatus() {
                // get Master db to avoid race conditions.
                // Otherwise, if chunk upload time < replag there will be spurious errors
                $dbw = $this->repo->getMasterDb();
@@ -256,7 +256,7 @@ class UploadFromChunks extends UploadFromFile {
         * Get the current Chunk index
         * @return Integer index of the current chunk
         */
-       private function getChunkIndex(){
+       private function getChunkIndex() {
                if( $this->mChunkIndex !== null ){
                        return $this->mChunkIndex;
                }
@@ -267,7 +267,7 @@ class UploadFromChunks extends UploadFromFile {
         * Gets the current offset in fromt the stashedupload table
         * @return Integer current byte offset of the chunk file set
         */
-       private function getOffset(){
+       private function getOffset() {
                if ( $this->mOffset !== null ){
                        return $this->mOffset;
                }
@@ -281,7 +281,7 @@ class UploadFromChunks extends UploadFromFile {
         * @throws UploadChunkFileException
         * @return FileRepoStatus
         */
-       private function outputChunk( $chunkPath ){
+       private function outputChunk( $chunkPath ) {
                // Key is fileKey + chunk index
                $fileKey = $this->getChunkFileKey();
 
@@ -306,7 +306,7 @@ class UploadFromChunks extends UploadFromFile {
                return $storeStatus;
        }
 
-       private function getChunkFileKey( $index = null ){
+       private function getChunkFileKey( $index = null ) {
                if( $index === null ){
                        $index = $this->getChunkIndex();
                }
index 81e61b7..0b8b344 100644 (file)
@@ -294,7 +294,7 @@ class TextPassDumper extends BackupDumper {
        }
 
        function setTimeExceeded() {
-               $this->timeExceeded = True;
+               $this->timeExceeded = true;
        }
 
        function checkIfTimeExceeded() {
index 1c96a57..b72430a 100644 (file)
@@ -2041,7 +2041,7 @@ class api extends pageTest {
        }
 
        // Adds all the elements to the array, using the specified prefix.
-       private static function addListParams( &$array, $prefix, $elements )  {
+       private static function addListParams( &$array, $prefix, $elements ) {
                foreach ( $elements as $element ) {
                        $array[$prefix . $element] = self::getParamDetails( $element );
                }
index b76f921..b1c16ad 100644 (file)
@@ -581,14 +581,14 @@ class languages {
                # Check default namespace name
                if( isset( $this->mNamespaceNames[$code][NS_PROJECT_TALK] ) ) {
                        $default = $this->mNamespaceNames[$code][NS_PROJECT_TALK];
-                       if ( strpos( $default, '$1' ) === FALSE ) {
+                       if ( strpos( $default, '$1' ) === false ) {
                                $namespaces[$default] = 'default';
                        }
                }
 
                # Check namespace aliases
                foreach( $this->mNamespaceAliases[$code] as $key => $value ) {
-                       if ( $value == NS_PROJECT_TALK && strpos( $key, '$1' ) === FALSE ) {
+                       if ( $value == NS_PROJECT_TALK && strpos( $key, '$1' ) === false ) {
                                $namespaces[$key] = '';
                        }
                }
index 54dada3..75b807a 100644 (file)
@@ -36,7 +36,7 @@ class SkinChick extends SkinTemplate {
        /**
         * @param $out OutputPage
         */
-       function setupSkinUserCss( OutputPage $out ){
+       function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
 
                $out->addModuleStyles( 'skins.chick' );
index 56c6b08..66b2a15 100644 (file)
@@ -38,7 +38,7 @@ class SkinCologneBlue extends SkinTemplate {
        /**
         * @param $out OutputPage
         */
-       function setupSkinUserCss( OutputPage $out ){
+       function setupSkinUserCss( OutputPage $out ) {
                $out->addModuleStyles( 'mediawiki.legacy.shared' );
                $out->addModuleStyles( 'mediawiki.legacy.oldshared' );
                $out->addModuleStyles( 'skins.cologneblue' );
index 900bdd8..466d16b 100644 (file)
@@ -37,7 +37,7 @@ class SkinModern extends SkinTemplate {
        /**
         * @param $out OutputPage
         */
-       function setupSkinUserCss( OutputPage $out ){
+       function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
                $out->addModuleStyles ('skins.modern');
        }
index c3f73e5..3028915 100644 (file)
@@ -36,7 +36,7 @@ class SkinNostalgia extends SkinLegacy {
        /**
         * @param $out OutputPage
         */
-       function setupSkinUserCss( OutputPage $out ){
+       function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
                $out->addModuleStyles( 'skins.nostalgia' );
        }
index 49a0ad5..5b358e0 100644 (file)
@@ -37,7 +37,7 @@ class SkinStandard extends SkinLegacy {
        /**
         * @param $out OutputPage
         */
-       function setupSkinUserCss( OutputPage $out ){
+       function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
                $out->addModuleStyles( 'skins.standard' );
 
index 8d685bd..b1f9a32 100644 (file)
@@ -65,7 +65,7 @@ class SkinVector extends SkinTemplate {
         * fixes bug 22916
         * @param $out OutputPage object
         */
-       function setupSkinUserCss( OutputPage $out ){
+       function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
                $out->addModuleStyles( 'skins.vector' );
        }