Use spacey style also for code in comments and documentation
Change-Id: I5ab30489fb1241b89d1bec88a4d1fcebcc69bb9a
This commit is contained in:
parent
157aa33781
commit
fdcaf249e3
5 changed files with 15 additions and 15 deletions
|
|
@ -24,7 +24,7 @@ variable MW_INSTALL_PATH in case the extension is not in the default location.
|
|||
The following code snippet lets you override the default path:
|
||||
|
||||
$IP = getenv( 'MW_INSTALL_PATH' );
|
||||
if( $IP === false ) {
|
||||
if ( $IP === false ) {
|
||||
$IP = __DIR__ . '/../..';
|
||||
}
|
||||
require_once "$IP/maintenance/Maintenance.php"; // a MediaWiki core file
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
*
|
||||
* @par Example:
|
||||
* @code
|
||||
* if( $user->isAnon() ) {
|
||||
* if ( $user->isAnon() ) {
|
||||
* throw new UserNotLoggedIn();
|
||||
* }
|
||||
* @endcode
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
*
|
||||
* @par Example:
|
||||
* @code
|
||||
* if( $user->isAnon() ) {
|
||||
* if ( $user->isAnon() ) {
|
||||
* throw new UserNotLoggedIn( 'action-require-loggedin' );
|
||||
* }
|
||||
* @endcode
|
||||
|
|
|
|||
|
|
@ -210,25 +210,25 @@ class KuConverter extends LanguageConverterSpecific {
|
|||
|
||||
$reg = '/^'.$roman.'$|^'.$roman.$breaks.'|'.$breaks.$roman.'$|'.$breaks.$roman.$breaks.'/';
|
||||
|
||||
$matches = preg_split($reg, $text, -1, PREG_SPLIT_OFFSET_CAPTURE);
|
||||
$matches = preg_split( $reg, $text, -1, PREG_SPLIT_OFFSET_CAPTURE );
|
||||
|
||||
$m = array_shift($matches);
|
||||
if( !isset( $this->mTables[$toVariant] ) ) {
|
||||
throw new MWException( "Broken variant table: " . implode( ',', array_keys( $this->mTables ) ) );
|
||||
$m = array_shift( $matches );
|
||||
if ( !isset( $this->mTables[$toVariant] ) ) {
|
||||
throw new MWException( 'Broken variant table: ' . implode( ',', array_keys( $this->mTables ) ) );
|
||||
}
|
||||
$ret = $this->mTables[$toVariant]->replace( $m[0] );
|
||||
$mstart = $m[1]+strlen($m[0]);
|
||||
foreach($matches as $m) {
|
||||
$ret .= substr($text, $mstart, $m[1]-$mstart);
|
||||
$ret .= parent::translate($m[0], $toVariant);
|
||||
$mstart = $m[1] + strlen($m[0]);
|
||||
$mstart = $m[1] + strlen( $m[0] );
|
||||
foreach ( $matches as $m ) {
|
||||
$ret .= substr( $text, $mstart, $m[1] - $mstart );
|
||||
$ret .= parent::translate( $m[0], $toVariant );
|
||||
$mstart = $m[1] + strlen( $m[0] );
|
||||
}
|
||||
|
||||
return $ret;
|
||||
*/
|
||||
|
||||
if ( !isset( $this->mTables[$toVariant] ) ) {
|
||||
throw new MWException( "Broken variant table: " . implode( ',', array_keys( $this->mTables ) ) );
|
||||
throw new MWException( 'Broken variant table: ' . implode( ',', array_keys( $this->mTables ) ) );
|
||||
}
|
||||
|
||||
return parent::translate( $text, $toVariant );
|
||||
|
|
|
|||
|
|
@ -1429,7 +1429,7 @@ class FormatMetadata extends ContextSource {
|
|||
/*
|
||||
// https://en.wikipedia.org/wiki/Euclidean_algorithm
|
||||
// Recursive form would be:
|
||||
if( $b == 0 )
|
||||
if ( $b == 0 )
|
||||
return $a;
|
||||
else
|
||||
return gcd( $b, $a % $b );
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ variable MW_INSTALL_PATH in case the extension is not in the default location.
|
|||
The following code snippet lets you override the default path:
|
||||
|
||||
$IP = getenv( 'MW_INSTALL_PATH' );
|
||||
if( $IP === false ) {
|
||||
if ( $IP === false ) {
|
||||
$IP = __DIR__ . '/../..';
|
||||
}
|
||||
require_once "$IP/maintenance/Maintenance.php"; // a MediaWiki core file
|
||||
|
|
|
|||
Loading…
Reference in a new issue