Documentation

StringEnumModel extends AbstractModel
in package
implements IScalarModel

FinalYes

Table of Contents

Interfaces

IScalarModel
Empty interface to easily check for a scalar type model.

Properties

$cases  : array<string|int, mixed>

Methods

__construct()  : mixed
getNotNullConstraint()  : INotNullConstraint|null
isNullable()  : bool
Shorter way to check whether the content can be null.

Properties

Methods

__construct()

public __construct(array<int, BackedEnum> $cases[, bool $isNullable = false ]) : mixed
Parameters
$cases : array<int, BackedEnum>

Set of allowed string-backed enum cases.

$isNullable : bool = false
Tags
todo

ci_cd Tell Phpstan for support for generic in backed enums (e.g. BackedEnum).

isNullable()

Shorter way to check whether the content can be null.

public isNullable() : bool
Attributes
#[Override]
Return values
bool
On this page

Search results