diff --git a/src/Money.php b/src/Money.php index deed7d1..b539365 100644 --- a/src/Money.php +++ b/src/Money.php @@ -11,7 +11,32 @@ use ReflectionMethod; /** - * @mixin \Money\Money + * Money. + * + * @method bool isSameCurrency(Money|\Money\Money ...$others) + * @method bool equals(Money|\Money\Money $other) + * @method int compare(Money|\Money\Money $other) + * @method bool greaterThan(Money|\Money\Money $other) + * @method bool greaterThanOrEqual(Money|\Money\Money $other) + * @method bool lessThan(Money|\Money\Money $other) + * @method bool lessThanOrEqual(Money|\Money\Money $other) + * @method string getAmount() + * @method \Money\Currency getCurrency() + * @method Money add(Money|\Money\Money ...$addends) + * @method Money subtract(Money|\Money\Money ...$subtrahends) + * @method Money mod(Money|\Money\Money $divisor) + * @method Money[] allocate(array $ratios) + * @method Money[] allocateTo(int $n) + * @method string ratioOf(Money|\Money\Money $money) + * @method Money absolute() + * @method Money negative() + * @method bool isZero() + * @method bool isPositive() + * @method bool isNegative() + * @method static Money min(Money|\Money\Money $first, Money|\Money\Money ...$collection) + * @method static Money max(Money|\Money\Money $first, Money|\Money\Money ...$collection) + * @method static Money sum(Money|\Money\Money $first, Money|\Money\Money ...$collection) + * @method static Money avg(Money|\Money\Money $first, Money|\Money\Money ...$collection) */ class Money implements Arrayable, Jsonable, JsonSerializable, Renderable { @@ -192,8 +217,8 @@ public function __call($method, array $arguments) $methods = [ 'add', 'subtract', 'multiply', 'divide', 'mod', - 'absolute', 'negative', 'allocate', 'allocateTo', + 'absolute', 'negative', ]; if (! in_array($method, $methods)) { diff --git a/src/MoneyFactory.php b/src/MoneyFactory.php index 3d26b78..a92221f 100644 --- a/src/MoneyFactory.php +++ b/src/MoneyFactory.php @@ -3,7 +3,7 @@ namespace Cknow\Money; /** - * Money. + * Money Factory. * * @method static Money AED(mixed $amount, bool $forceDecimals = false, string|null $locale = null, \Money\Currencies|null $currencies = null) * @method static Money ALL(mixed $amount, bool $forceDecimals = false, string|null $locale = null, \Money\Currencies|null $currencies = null)