/**
* Returns true if a language code is an IETF tag known to MediaWiki.
*
- * @param string $code
+ * @param string $tag
*
* @since 1.21
* @return bool
* Get the formatted date and time for the given timestamp and formatted for
* the given user.
*
- * @param mixed $ts the time format which needs to be turned into a
+ * @param mixed $ts The time format which needs to be turned into a
* date('YmdHis') format with wfTimestamp(TS_MW,$ts)
* @param User $user User object used to get preferences for timezone and format
* @param array $options Array, can contain the following keys:
*/
function getMagic( $mw ) {
// Saves a function call
- if ( ! $this->mMagicHookDone ) {
+ if ( !$this->mMagicHookDone ) {
$this->doMagicHook();
}
*
* @since 1.23
*
- * @param int $count non-localized number
- * @param array $forms different plural forms
+ * @param int $count Non-localized number
+ * @param array $forms Different plural forms
*
* @return array|string
*/
foreach ( $forms as $index => $form ) {
if ( preg_match( '/\d+=/i', $form ) ) {
$pos = strpos( $form, '=' );
- if ( substr( $form, 0, $pos ) === (string) $count ) {
+ if ( substr( $form, 0, $pos ) === (string)$count ) {
return substr( $form, $pos + 1 );
}
unset( $forms[$index] );
* Checks that convertPlural was given an array and pads it to requested
* amount of forms by copying the last one.
*
- * @param int $count How many forms should there be at least
* @param array $forms Array of forms given to convertPlural
+ * @param int $count How many forms should there be at least
* @return array Padded array of forms or an exception if not an array
*/
protected function preConvertPlural( /* Array */ $forms, $count ) {
* possible that non-existing link in one variant
* actually exists in another variant. this function
* tries to find it. See e.g. LanguageZh.php
+ * The input parameters may be modified upon return
*
- * @param string $link The name of the link
- * @param Title $nt The title object of the link
+ * @param string &$link The name of the link
+ * @param Title &$nt The title object of the link
* @param bool $ignoreOtherCond To disable other conditions when
* we need to transclude a template or update a category's link
- * @return null the input parameters may be modified upon return
*/
public function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
$this->mConverter->findVariantLink( $link, $nt, $ignoreOtherCond );
if ( !isset( $format['avoid'] ) ) {
$format['avoid'] = false;
}
- if ( !isset( $format['noabbrevs' ] ) ) {
+ if ( !isset( $format['noabbrevs'] ) ) {
$format['noabbrevs'] = false;
}
$secondsMsg = wfMessage(