class IsOdd extends NumberComparator (View source)

Checks if a number is odd.

Traits

Methods

bool
__invoke(mixed $value)

Compare the input value against the comparator.

bool
check(mixed $value)

Compare the input number against the comparator.

bool
checkNumber(int|float $value)

Compare the input number against the comparator.

static Makes
make()

Create a new instance of the class.

from  Makes

Details

final bool __invoke(mixed $value)

Compare the input value against the comparator.

Parameters

mixed $value

Return Value

bool

final bool check(mixed $value)

Compare the input number against the comparator.

Parameters

mixed $value

Return Value

bool

protected bool checkNumber(int|float $value)

Compare the input number against the comparator.

Parameters

int|float $value

Return Value

bool

static Makes make()

Create a new instance of the class.

Return Value

Makes