class IntegerRepository

Traits

Properties

protected int|null $data

The repository value.

Methods

mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

__construct(int|null $value = null)

Create an integer repository.

set(int|null $value)

Set the repository value.

int|null
get()

Get the repository value.

bool
isEmpty()

Determine if the repository is empty.

bool
isNotEmpty()

Determine if the repository is not empty.

Details

in Conditionable at line 23
mixed when(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

in Conditionable at line 56
mixed unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

at line 21
__construct(int|null $value = null)

Create an integer repository.

Parameters

int|null $value

at line 31
IntegerRepository set(int|null $value)

Set the repository value.

Parameters

int|null $value

Return Value

IntegerRepository

at line 41
int|null get()

Get the repository value.

Return Value

int|null

at line 49
bool isEmpty()

Determine if the repository is empty.

Return Value

bool

at line 57
bool isNotEmpty()

Determine if the repository is not empty.

Return Value

bool