X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FMWTimestamp.php;h=02a3d2cfe6d7e6beaf3f5f27d2ec2725122836fe;hp=7f3649e39c06a2e3bb8d9010b3634d37eec02347;hb=3bf40e4021fbe1087ab275767d5cf367b4a32f02;hpb=980c688c2b9833fd83c3f4a7f5bf75031a071c74 diff --git a/includes/MWTimestamp.php b/includes/MWTimestamp.php index 7f3649e39c..02a3d2cfe6 100644 --- a/includes/MWTimestamp.php +++ b/includes/MWTimestamp.php @@ -93,9 +93,9 @@ class MWTimestamp extends ConvertibleTimestamp { if ( $tz ) { $this->timestamp->setTimezone( $tz ); return new DateInterval( 'P0Y' ); - } else { - $data[0] = 'Offset'; } + + $data[0] = 'Offset'; } $diff = 0; @@ -138,9 +138,9 @@ class MWTimestamp extends ConvertibleTimestamp { * Generate a purely relative timestamp, i.e., represent the time elapsed between * the given base timestamp and this object. * - * @param MWTimestamp $relativeTo Relative base timestamp (defaults to now) - * @param User $user Use to use offset for - * @param Language $lang Language to use + * @param MWTimestamp|null $relativeTo Relative base timestamp (defaults to now) + * @param User|null $user Use to use offset for + * @param Language|null $lang Language to use * @param array $chosenIntervals Intervals to use to represent it * @return string Relative timestamp */ @@ -189,9 +189,9 @@ class MWTimestamp extends ConvertibleTimestamp { $msg = wfMessage( $key ); if ( $msg->exists() ) { return $msg; - } else { - return new RawMessage( $tzMsg ); } + + return new RawMessage( $tzMsg ); } /**