Round
class Round extends NumberMutator (View source)
Round a number. By default, this will round to the nearest integer. The precision and mode can be set to change this.
Methods
__construct(int $precision = 0, int $mode = PHP_ROUND_HALF_UP)
No description
float|int
mutateNumber(float|int $value)
No description
Details
__construct(int $precision = 0, int $mode = PHP_ROUND_HALF_UP)
No description
static Round
make(int $precision = 0, int $mode = PHP_ROUND_HALF_UP)
No description
mixed
mutate(mixed $value)
Mutate the input value.
protected float|int
mutateNumber(float|int $value)
No description