X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=languages%2Fclasses%2FLanguageZh_hans.php;h=77a41e12c164405e8d87b632df54b9bc2433ad20;hb=2464990eafee1aec9cefff0f70ffa01c08e095af;hp=3851c8fed5e0aa4b0d00633ca5d5ec091a4d6647;hpb=0182f3fb638750850b7a34018730e77f2fffd048;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/classes/LanguageZh_hans.php b/languages/classes/LanguageZh_hans.php index 3851c8fed5..77a41e12c1 100644 --- a/languages/classes/LanguageZh_hans.php +++ b/languages/classes/LanguageZh_hans.php @@ -26,8 +26,9 @@ * * @ingroup Language */ +// @codingStandardsIgnoreStart Ignore class name is not in camel caps format error class LanguageZh_hans extends Language { - + // @codingStandardsIgnoreEnd /** * @return bool */ @@ -40,7 +41,7 @@ class LanguageZh_hans extends Language { * for now just treat each character as a word. * @todo FIXME: Only do this for Han characters... * - * @param $string string + * @param string $string * * @return string */ @@ -51,18 +52,16 @@ class LanguageZh_hans extends Language { } /** - * @param $s + * @param string $s * @return string */ function normalizeForSearch( $s ) { - wfProfileIn( __METHOD__ ); // Double-width roman characters $s = parent::normalizeForSearch( $s ); $s = trim( $s ); $s = $this->segmentByWord( $s ); - wfProfileOut( __METHOD__ ); return $s; } @@ -71,19 +70,19 @@ class LanguageZh_hans extends Language { * * @since 1.21 * - * @param integer $seconds The amount of seconds. + * @param int $seconds The amount of seconds. * @param array $chosenIntervals The intervals to enable. * * @return string */ - public function formatDuration( $seconds, array $chosenIntervals = array() ) { + public function formatDuration( $seconds, array $chosenIntervals = [] ) { if ( empty( $chosenIntervals ) ) { - $chosenIntervals = array( 'centuries', 'years', 'days', 'hours', 'minutes', 'seconds' ); + $chosenIntervals = [ 'centuries', 'years', 'days', 'hours', 'minutes', 'seconds' ]; } $intervals = $this->getDurationIntervals( $seconds, $chosenIntervals ); - $segments = array(); + $segments = []; foreach ( $intervals as $intervalName => $intervalValue ) { // Messages: duration-seconds, duration-minutes, duration-hours, duration-days, duration-weeks,