aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2012-12-20 16:09:25 +0100
committerAntoine Musso <hashar@free.fr>2012-12-20 16:09:25 +0100
commitcb60d72be1316d3d49ec9e636f18a1143f263d78 (patch)
treee26e9f6ccd7e3fbc6694205fbcc32439bd4ba00b
parentbf5fe52df22d23042c9a0e5d544566d3a96e98a4 (diff)
downloadmediawikicore-cb60d72be1316d3d49ec9e636f18a1143f263d78.tar.gz
mediawikicore-cb60d72be1316d3d49ec9e636f18a1143f263d78.zip
misc style fix
* makes booleans lower case * add spaces before open braces Change-Id: Id88884e08bc23d7730361ee91646f54f5e16920b
-rw-r--r--includes/Block.php12
-rw-r--r--includes/MagicWord.php4
-rw-r--r--includes/Metadata.php2
-rw-r--r--includes/OutputPage.php8
-rw-r--r--includes/Preferences.php2
-rw-r--r--includes/SiteConfiguration.php6
-rw-r--r--includes/User.php6
-rw-r--r--includes/actions/DeleteAction.php4
-rw-r--r--includes/actions/EditAction.php6
-rw-r--r--includes/actions/ProtectAction.php6
-rw-r--r--includes/actions/RenderAction.php4
-rw-r--r--includes/actions/ViewAction.php4
-rw-r--r--includes/installer/Ibm_db2Installer.php2
-rw-r--r--includes/media/DjVu.php2
-rw-r--r--includes/profiler/Profiler.php2
-rw-r--r--includes/upload/UploadFromChunks.php14
-rw-r--r--maintenance/backupTextPass.inc2
-rw-r--r--maintenance/fuzz-tester.php2
-rw-r--r--maintenance/language/languages.inc4
-rw-r--r--skins/Chick.php2
-rw-r--r--skins/CologneBlue.php2
-rw-r--r--skins/Modern.php2
-rw-r--r--skins/Nostalgia.php2
-rw-r--r--skins/Standard.php2
-rw-r--r--skins/Vector.php2
25 files changed, 52 insertions, 52 deletions
diff --git a/includes/Block.php b/includes/Block.php
index e05b2acfa453..4c878b6129b9 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -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;
}
}
diff --git a/includes/MagicWord.php b/includes/MagicWord.php
index 6d2e1dca9402..357eae4a338a 100644
--- a/includes/MagicWord.php
+++ b/includes/MagicWord.php
@@ -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 ){
diff --git a/includes/Metadata.php b/includes/Metadata.php
index 0ca153933ae0..15894a472e09 100644
--- a/includes/Metadata.php
+++ b/includes/Metadata.php
@@ -150,7 +150,7 @@ abstract class RdfMetaData {
}
}
- protected function getTerms( $url ){
+ protected function getTerms( $url ) {
global $wgLicenseTerms;
if( $wgLicenseTerms ){
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 868c7865ebd6..c06b7704bf2d 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -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 );
}
diff --git a/includes/Preferences.php b/includes/Preferences.php
index 9a108672b047..96d9e6d15aa1 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -1326,7 +1326,7 @@ class Preferences {
* @param $alldata
* @return int
*/
- static function filterIntval( $value, $alldata ){
+ static function filterIntval( $value, $alldata ) {
return intval( $value );
}
diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php
index 6a861d8e885e..afe0cc7342e6 100644
--- a/includes/SiteConfiguration.php
+++ b/includes/SiteConfiguration.php
@@ -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'] ) ) {
diff --git a/includes/User.php b/includes/User.php
index 28ff63004797..91e75b530e97 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -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 ) ){
diff --git a/includes/actions/DeleteAction.php b/includes/actions/DeleteAction.php
index 5a5a382b20c2..3cb24e665578 100644
--- a/includes/actions/DeleteAction.php
+++ b/includes/actions/DeleteAction.php
@@ -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();
diff --git a/includes/actions/EditAction.php b/includes/actions/EditAction.php
index 08a33f4c0d9f..eb261fc8796d 100644
--- a/includes/actions/EditAction.php
+++ b/includes/actions/EditAction.php
@@ -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();
diff --git a/includes/actions/ProtectAction.php b/includes/actions/ProtectAction.php
index f053ede779bf..1b55a3ccf0e1 100644
--- a/includes/actions/ProtectAction.php
+++ b/includes/actions/ProtectAction.php
@@ -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();
diff --git a/includes/actions/RenderAction.php b/includes/actions/RenderAction.php
index 80af79cc646e..23cae6ac0f82 100644
--- a/includes/actions/RenderAction.php
+++ b/includes/actions/RenderAction.php
@@ -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();
diff --git a/includes/actions/ViewAction.php b/includes/actions/ViewAction.php
index d57585ee1f52..af5a67474de3 100644
--- a/includes/actions/ViewAction.php
+++ b/includes/actions/ViewAction.php
@@ -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();
}
diff --git a/includes/installer/Ibm_db2Installer.php b/includes/installer/Ibm_db2Installer.php
index ca9bdf4b1ba2..bf19055a75e3 100644
--- a/includes/installer/Ibm_db2Installer.php
+++ b/includes/installer/Ibm_db2Installer.php
@@ -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';
}
diff --git a/includes/media/DjVu.php b/includes/media/DjVu.php
index 84672e05c40a..124db3230ac7 100644
--- a/includes/media/DjVu.php
+++ b/includes/media/DjVu.php
@@ -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;
diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php
index f6f2117c786f..e3d22f8127ec 100644
--- a/includes/profiler/Profiler.php
+++ b/includes/profiler/Profiler.php
@@ -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)
diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php
index 2b0128b37632..821f4828eeb5 100644
--- a/includes/upload/UploadFromChunks.php
+++ b/includes/upload/UploadFromChunks.php
@@ -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();
}
diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc
index 81e61b7bd515..0b8b3445586d 100644
--- a/maintenance/backupTextPass.inc
+++ b/maintenance/backupTextPass.inc
@@ -294,7 +294,7 @@ class TextPassDumper extends BackupDumper {
}
function setTimeExceeded() {
- $this->timeExceeded = True;
+ $this->timeExceeded = true;
}
function checkIfTimeExceeded() {
diff --git a/maintenance/fuzz-tester.php b/maintenance/fuzz-tester.php
index 1c96a57161dc..b72430a7aa51 100644
--- a/maintenance/fuzz-tester.php
+++ b/maintenance/fuzz-tester.php
@@ -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 );
}
diff --git a/maintenance/language/languages.inc b/maintenance/language/languages.inc
index b76f921dd686..b1c16adfae32 100644
--- a/maintenance/language/languages.inc
+++ b/maintenance/language/languages.inc
@@ -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] = '';
}
}
diff --git a/skins/Chick.php b/skins/Chick.php
index 54dada3de787..75b807ad99ba 100644
--- a/skins/Chick.php
+++ b/skins/Chick.php
@@ -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' );
diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php
index 56c6b0868fd9..66b2a15a04a2 100644
--- a/skins/CologneBlue.php
+++ b/skins/CologneBlue.php
@@ -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' );
diff --git a/skins/Modern.php b/skins/Modern.php
index 900bdd8974d9..466d16b1d9ad 100644
--- a/skins/Modern.php
+++ b/skins/Modern.php
@@ -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');
}
diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php
index c3f73e5b68ac..3028915e3bb0 100644
--- a/skins/Nostalgia.php
+++ b/skins/Nostalgia.php
@@ -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' );
}
diff --git a/skins/Standard.php b/skins/Standard.php
index 49a0ad5d2e33..5b358e06685b 100644
--- a/skins/Standard.php
+++ b/skins/Standard.php
@@ -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' );
diff --git a/skins/Vector.php b/skins/Vector.php
index 8d685bdf6c7c..b1f9a3201c02 100644
--- a/skins/Vector.php
+++ b/skins/Vector.php
@@ -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' );
}