Skip to content

Commit

Permalink
Update Formatter types
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekr authored Mar 4, 2021
1 parent cbeb652 commit 3c3de4e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions i18n/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public function asRaw($value)

/**
* Formats the value as an HTML-encoded plain text.
* @param string $value the value to be formatted.
* @param string|null $value the value to be formatted.
* @return string the formatted result.
*/
public function asText($value)
Expand All @@ -499,7 +499,7 @@ public function asText($value)

/**
* Formats the value as an HTML-encoded plain text with newlines converted into breaks.
* @param string $value the value to be formatted.
* @param string|null $value the value to be formatted.
* @return string the formatted result.
*/
public function asNtext($value)
Expand All @@ -515,7 +515,7 @@ public function asNtext($value)
* Formats the value as HTML-encoded text paragraphs.
* Each text paragraph is enclosed within a `<p>` tag.
* One or multiple consecutive empty lines divide two paragraphs.
* @param string $value the value to be formatted.
* @param string|null $value the value to be formatted.
* @return string the formatted result.
*/
public function asParagraphs($value)
Expand All @@ -531,7 +531,7 @@ public function asParagraphs($value)
* Formats the value as HTML text.
* The value will be purified using [[HtmlPurifier]] to avoid XSS attacks.
* Use [[asRaw()]] if you do not want any purification of the value.
* @param string $value the value to be formatted.
* @param string|null $value the value to be formatted.
* @param array|null $config the configuration for the HTMLPurifier class.
* @return string the formatted result.
*/
Expand All @@ -546,7 +546,7 @@ public function asHtml($value, $config = null)

/**
* Formats the value as a mailto link.
* @param string $value the value to be formatted.
* @param string|null $value the value to be formatted.
* @param array $options the tag options in terms of name-value pairs. See [[Html::mailto()]].
* @return string the formatted result.
*/
Expand Down Expand Up @@ -871,7 +871,7 @@ protected function normalizeDatetimeValue($value, $checkDateTimeInfo = false)

/**
* Formats a date, time or datetime in a float number as UNIX timestamp (seconds since 01-01-1970).
* @param int|string|DateTime|DateTimeInterface $value the value to be formatted. The following
* @param int|string|DateTime|DateTimeInterface|null $value the value to be formatted. The following
* types of value are supported:
*
* - an integer representing a UNIX timestamp
Expand Down Expand Up @@ -997,7 +997,7 @@ public function asRelativeTime($value, $referenceTime = null)
/**
* Represents the value as duration in human readable format.
*
* @param DateInterval|string|int $value the value to be formatted. Acceptable formats:
* @param DateInterval|string|int|null $value the value to be formatted. Acceptable formats:
* - [DateInterval object](https://secure.php.net/manual/ru/class.dateinterval.php)
* - integer - number of seconds. For example: value `131` represents `2 minutes, 11 seconds`
* - ISO8601 duration format. For example, all of these values represent `1 day, 2 hours, 30 minutes` duration:
Expand Down Expand Up @@ -1373,7 +1373,7 @@ public function asOrdinal($value)
* If [[sizeFormatBase]] is 1024, [binary prefixes](http://en.wikipedia.org/wiki/Binary_prefix) (e.g. kibibyte/KiB, mebibyte/MiB, ...)
* are used in the formatting result.
*
* @param string|int|float $value value in bytes to be formatted.
* @param string|int|float|null $value value in bytes to be formatted.
* @param int|null $decimals the number of digits after the decimal point.
* @param array $options optional configuration for the number formatter. This parameter will be merged with [[numberFormatterOptions]].
* @param array $textOptions optional configuration for the number formatter. This parameter will be merged with [[numberFormatterTextOptions]].
Expand Down Expand Up @@ -1429,7 +1429,7 @@ public function asShortSize($value, $decimals = null, $options = [], $textOption
* If [[sizeFormatBase]] is 1024, [binary prefixes](http://en.wikipedia.org/wiki/Binary_prefix) (e.g. kibibyte/KiB, mebibyte/MiB, ...)
* are used in the formatting result.
*
* @param string|int|float $value value in bytes to be formatted.
* @param string|int|float|null $value value in bytes to be formatted.
* @param int|null $decimals the number of digits after the decimal point.
* @param array $options optional configuration for the number formatter. This parameter will be merged with [[numberFormatterOptions]].
* @param array $textOptions optional configuration for the number formatter. This parameter will be merged with [[numberFormatterTextOptions]].
Expand Down Expand Up @@ -1568,7 +1568,7 @@ public function asShortWeight($value, $decimals = null, $options = [], $textOpti
/**
* @param string $unitType one of [[UNIT_WEIGHT]], [[UNIT_LENGTH]]
* @param string $unitFormat one of [[FORMAT_WIDTH_SHORT]], [[FORMAT_WIDTH_LONG]]
* @param float|int $value to be formatted
* @param float|int|null $value to be formatted
* @param float $baseUnit unit of value as the multiplier of the smallest unit. When `null`, property [[baseUnits]]
* will be used to determine base unit using $unitType and $unitSystem.
* @param string $unitSystem either [[UNIT_SYSTEM_METRIC]] or [[UNIT_SYSTEM_IMPERIAL]]. When `null`, property [[systemOfUnits]] will be used.
Expand Down

0 comments on commit 3c3de4e

Please sign in to comment.