class Modulo extends NumberMutator (View source)

Calculate the modulo of a number.

Methods

__construct(float|int $divisor)

No description

mixed
__invoke(mixed $value)

Mutate the input value.

from  Mutator
static Modulo
make(float|int $divisor)

No description

mixed
mutate(mixed $value)

Mutate the input value.

float|int
mutateNumber(float|int $value)

No description

Details

__construct(float|int $divisor)

No description

Parameters

float|int $divisor

The divisor to divide with.

final mixed __invoke(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

static Modulo make(float|int $divisor)

No description

Parameters

float|int $divisor

The divisor to divide with.

Return Value

Modulo

mixed mutate(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

protected float|int mutateNumber(float|int $value)

No description

Parameters

float|int $value

Return Value

float|int