}
}
$expiry = $title->getRestrictionExpiry( $restrictionType );
- $formattedexpiry = $this->msg( 'parentheses', $this->getLanguage()->formatExpiry( $expiry ) )->escaped();
+ $formattedexpiry = $this->msg( 'parentheses',
+ $this->getLanguage()->formatExpiry( $expiry ) )->escaped();
$message .= $this->msg( 'word-separator' )->escaped() . $formattedexpiry;
// Messages: restriction-edit, restriction-move, restriction-create,
$msg = wfMessage( 'watchlist' )->inContentLanguage()->text();
- $feedTitle = $this->getConfig()->get( 'Sitename' ) . ' - ' . $msg . ' [' . $this->getConfig()->get( 'LanguageCode' ) . ']';
+ $feedTitle = $this->getConfig()->get( 'Sitename' ) . ' - ' . $msg .
+ ' [' . $this->getConfig()->get( 'LanguageCode' ) . ']';
$feedUrl = SpecialPage::getTitleFor( 'Watchlist' )->getFullURL();
$feed = new $feedClasses[$params['feedformat']] (
preg_match( '/\<\s*cross-domain-policy\s*\>/i', $text )
) {
$this->dieUsage(
- 'This response cannot be represented using format=php. See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+ 'This response cannot be represented using format=php. ' .
+ 'See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
'internalerror'
);
}
if ( !$title || !$title instanceof Title ) {
global $wgTitle;
- wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers( 5 ) . ' with no title set.' );
+ wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' .
+ wfGetAllCallers( 5 ) . ' with no title set.' );
$title = $wgTitle;
}
// Sometimes $wgTitle isn't set either...
function getSpellCheck() {
$val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
- if( is_bool( $val ) ) {
+ if ( is_bool( $val ) ) {
// "spellcheck" attribute literally requires "true" or "false" to work.
return $val === true ? 'true' : 'false';
}
function getSpellCheck() {
$val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
- if( is_bool( $val ) ) {
+ if ( is_bool( $val ) ) {
// "spellcheck" attribute literally requires "true" or "false" to work.
return $val === true ? 'true' : 'false';
}
use Liuggio\StatsdClient\Entity\StatsdDataInterface;
use Liuggio\StatsdClient\Factory\StatsdDataFactory;
-
/**
* A factory for application metric data.
*
use UtfNormal\Utils;
+
/**
* Return UTF-8 sequence for a given Unicode code point.
*
}
/**
- * Turns an XMP-style multivalue array into a single value by dropping all but the first value.
- * If the value is not a multivalue array (or a multivalue array inside a multilang array), it is returned unchanged.
+ * Turns an XMP-style multivalue array into a single value by dropping all but the first
+ * value. If the value is not a multivalue array (or a multivalue array inside a multilang
+ * array), it is returned unchanged.
* See mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
* @param mixed $value
* @return mixed The value, or the first value if there were multiple ones
protected function resolveMultivalueValue( $value ) {
if ( !is_array( $value ) ) {
return $value;
- } elseif ( isset( $value['_type'] ) && $value['_type'] === 'lang' ) { // if this is a multilang array, process fields separately
+ } elseif ( isset( $value['_type'] ) && $value['_type'] === 'lang' ) {
+ // if this is a multilang array, process fields separately
$newValue = array();
foreach ( $value as $k => $v ) {
$newValue[$k] = $this->resolveMultivalueValue( $v );
? $article->getPage()
: $article;
-
if ( !$useOutdated && $value->expired( $touched ) ) {
wfIncrStats( "pcache.miss.expired" );
$cacheTime = $value->getCacheTime();
}
/**
- * Given a key (any string) and the number of lots, returns a slot number (an integer from the [0..($slots-1)] range).
- * This is used for a global limit on the number of instances of a given type that can acquire a lock.
- * The hashing is deterministic so that PoolCounter::$workers is always an upper limit of how many instances with
- * the same key can acquire a lock.
+ * Given a key (any string) and the number of lots, returns a slot number (an integer from
+ * the [0..($slots-1)] range). This is used for a global limit on the number of instances of
+ * a given type that can acquire a lock. The hashing is deterministic so that
+ * PoolCounter::$workers is always an upper limit of how many instances with the same key
+ * can acquire a lock.
*
* @param string $key PoolCounter instance key (any string)
* @param int $slots The number of slots (max allowed value is 65536)
public function log( array $stats ) {
$data = $this->collector->getRawData();
- $filename = sprintf( "%s/%s.%s%s", $this->params['outputDir'], uniqid(), $this->collector->getProfileID(), $this->suffix );
+ $filename = sprintf( "%s/%s.%s%s",
+ $this->params['outputDir'],
+ uniqid(),
+ $this->collector->getProfileID(),
+ $this->suffix );
file_put_contents( $filename, serialize( $data ) );
}
}
/**
* @param string $errorMessage Localisation message describing the error (since MW 1.26)
* @param string $titleText The invalid title text (since MW 1.26)
- * @param string[] $errorMessageParameters Additional parameters for the error message. $titleText will be appended if it's not null. (since MW 1.26)
+ * @param string[] $errorMessageParameters Additional parameters for the error message.
+ * $titleText will be appended if it's not null. (since MW 1.26)
*/
public function __construct( $errorMessage = null, $titleText = null, $errorMessageParameters = array() ) {
$this->errorMessage = $errorMessage;