diff --git a/src/BigDecimal.php b/src/BigDecimal.php index 4128a57..e70870d 100644 --- a/src/BigDecimal.php +++ b/src/BigDecimal.php @@ -45,6 +45,8 @@ final class BigDecimal extends BigNumber implements \Serializable } /** + * Creates a BigDecimal of the given value. + * * @param BigNumber|number|string $value * * @return BigDecimal @@ -57,12 +59,16 @@ final class BigDecimal extends BigNumber implements \Serializable } /** - * @param BigInteger|int|string $value An integer representing the unscaled value of the number. - * @param int $scale The scale of the number, positive or zero. + * Creates a BigDecimal from an unscaled value and a scale. + * + * Example: `(12345, 3)` will result in the BigDecimal `12.345`. + * + * @param BigNumber|number|string $value The unscaled value. Must be convertible to a BigInteger. + * @param int $scale The scale of the number, positive or zero. * * @return BigDecimal * - * @throws \InvalidArgumentException + * @throws \InvalidArgumentException If the scale is negative. */ public static function ofUnscaledValue($value, $scale = 0) { diff --git a/src/BigInteger.php b/src/BigInteger.php index 6ac485c..e9dadcf 100644 --- a/src/BigInteger.php +++ b/src/BigInteger.php @@ -36,6 +36,8 @@ final class BigInteger extends BigNumber implements \Serializable } /** + * Creates a BigInteger of the given value. + * * @param BigNumber|number|string $value * * @return BigInteger diff --git a/src/BigNumber.php b/src/BigNumber.php index 4b9ad52..afa69f1 100644 --- a/src/BigNumber.php +++ b/src/BigNumber.php @@ -102,6 +102,8 @@ abstract class BigNumber /** * Proxy method to access protected constructors from sibling classes. * + * @internal + * * @param mixed ...$args The arguments to the constructor. * * @return static diff --git a/src/BigRational.php b/src/BigRational.php index b336e79..8d69e1e 100644 --- a/src/BigRational.php +++ b/src/BigRational.php @@ -55,6 +55,8 @@ final class BigRational extends BigNumber implements \Serializable } /** + * Creates a BigRational of the given value. + * * @param BigNumber|number|string $value * * @return BigRational