Skip to content

Commit 87ae01c

Browse files
committed
Updating & fixing PHPDocs.
1 parent 5a005b9 commit 87ae01c

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

src/Speller.php

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
use js\tools\numbers2words\exceptions\InvalidArgumentException;
55

66
/**
7-
* This class offers a number spelling in various languages.
8-
* It is a work-in-progress and more languages are to be added in future.
9-
* The main and only two public methods are spellNumber() and spellCurrency().
7+
* This class offers number spelling in various languages.
108
*
119
* @author Juris Sudmalis
1210
*/
@@ -56,7 +54,7 @@ private final function __construct()
5654
}
5755

5856
/**
59-
* @param string $language : a two-letter, ISO 639-1 code of the language
57+
* @param string $language A two-letter, ISO 639-1 code of the language.
6058
* @return Speller
6159
*/
6260
private static function get($language)
@@ -96,11 +94,10 @@ public static function getAcceptedCurrencies()
9694
/**
9795
* Convert a number into its linguistic representation.
9896
*
99-
* @param int $number : the number to spell in the specified language
100-
* @param string $language : a two-letter, ISO 639-1 code of the language to spell the number in
101-
* @return string : the whole part as written in words in the specified language plus ISO 639-1 code
102-
* and decimal part in ##/100 format
103-
* @throws InvalidArgumentException if any parameter is invalid
97+
* @param int $number The number to spell in the specified language.
98+
* @param string $language A two-letter, ISO 639-1 code of the language to spell the number in.
99+
* @return string The number as written in words in the specified language.
100+
* @throws InvalidArgumentException If any parameter is invalid.
104101
*/
105102
public static function spellNumber($number, $language)
106103
{
@@ -114,11 +111,11 @@ public static function spellNumber($number, $language)
114111
* Convert currency to its linguistic representation.
115112
* The format is {whole part spelled} CODE {decimal part}/100.
116113
*
117-
* @param int|float $amount : the amount to spell in the specified language
118-
* @param string $language : a two-letter, ISO 639-1 code of the language to spell the amount in
119-
* @param string $currency : a three-letter, ISO 4217 currency code
120-
* @return string : the currency as written in words in the specified language with ISO 4217 currency code
121-
* @throws InvalidArgumentException if any parameter is invalid
114+
* @param int|float $amount The amount to spell in the specified language.
115+
* @param string $language A two-letter, ISO 639-1 code of the language to spell the amount in.
116+
* @param string $currency A three-letter, ISO 4217 currency code.
117+
* @return string The currency as written in words in the specified language.
118+
* @throws InvalidArgumentException If any parameter is invalid.
122119
*/
123120
public static function spellCurrencyShort($amount, $language, $currency)
124121
{
@@ -142,14 +139,14 @@ public static function spellCurrencyShort($amount, $language, $currency)
142139
/**
143140
* Convert currency to its linguistic representation.
144141
*
145-
* @param int|float $amount : the amount to spell in the specified language
146-
* @param string $language : a two-letter, ISO 639-1 code of the language to spell the amount in
147-
* @param string $currency : a three-letter, ISO 4217 currency code
148-
* @param bool $requireDecimal : if true, output decimals even if the value is 0
149-
* @param bool $spellDecimal : if true, spell decimals out same as whole numbers;
150-
* otherwise, output decimals as numbers
151-
* @return string : the currency as written in words in the specified language
152-
* @throws InvalidArgumentException if any parameter is invalid
142+
* @param int|float $amount The amount to spell in the specified language.
143+
* @param string $language A two-letter, ISO 639-1 code of the language to spell the amount in.
144+
* @param string $currency A three-letter, ISO 4217 currency code.
145+
* @param bool $requireDecimal If true, output decimals even if the value is 0.
146+
* @param bool $spellDecimal If true, spell decimals out same as whole numbers;
147+
* otherwise, output decimals as numbers.
148+
* @return string The currency as written in words in the specified language.
149+
* @throws InvalidArgumentException If any parameter is invalid.
153150
*/
154151
public static function spellCurrency($amount, $language, $currency, $requireDecimal = true, $spellDecimal = false)
155152
{

0 commit comments

Comments
 (0)