Use spacey style also for code in comments and documentation

Change-Id: I5ab30489fb1241b89d1bec88a4d1fcebcc69bb9a
This commit is contained in:
Fomafix 2022-08-12 08:59:10 +00:00
parent 157aa33781
commit fdcaf249e3
5 changed files with 15 additions and 15 deletions

View file

@ -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

View 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

View file

@ -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 );

View file

@ -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 );

View file

@ -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