Documentation

EnumGenerator
in package

FinalYes
Tags
psalm-immutable

Table of Contents

Constants

INDENTATION  = ' '
spaces of indentation by default
LINE_FEED  = "\n"
Line feed to use in place of EOL

Properties

$cases  : BackedCases|PureCases
$name  : Name

Methods

fromReflection()  : self
generate()  : string
withConfig()  : self
__construct()  : mixed
retrieveCases()  : string
retrieveType()  : string

Constants

INDENTATION

spaces of indentation by default

private mixed INDENTATION = ' '

LINE_FEED

Line feed to use in place of EOL

private mixed LINE_FEED = "\n"

Properties

Methods

fromReflection()

public static fromReflection(ReflectionEnum $enum) : self
Parameters
$enum : ReflectionEnum
Return values
self

withConfig()

public static withConfig(array<string|int, mixed> $options) : self
Parameters
$options : array<string|int, mixed>
Tags
psalm-param

array{ name: non-empty-string, pureCases: list, }|array{ name: non-empty-string, backedCases: array{ type: 'int'|'string', cases: array<non-empty-string, int|non-empty-string>, }, } $options

Return values
self

__construct()

private __construct(Name $name, BackedCases|PureCases $cases) : mixed
Parameters
$name : Name
$cases : BackedCases|PureCases

retrieveCases()

private retrieveCases() : string
Return values
string

retrieveType()

private retrieveType() : string
Return values
string

        
On this page

Search results