class CodeGeneratorConfig

Configuration for code generation

Methods

__construct(array $options = array())

Creates a new configuration for code generator

bool
getGenerateDocblock()

Returns whether docblocks should be generated

$this
setGenerateDocblock(bool $generate)

Sets whether docblocks should be generated

bool
getGenerateEmptyDocblock()

Returns whether empty docblocks are generated

$this
setGenerateEmptyDocblock(bool $generate)

Sets whether empty docblocks are generated

bool
getGenerateScalarTypeHints()

Returns whether scalar type hints will be generated for method parameters (PHP 7)

bool
isSortingEnabled()

Returns whether sorting is enabled

string|bool|Comparator|Closure
getUseStatementSorting()

Returns the use statement sorting

string|bool|Comparator|Closure
getConstantSorting()

Returns the constant sorting

string|bool|Comparator|Closure
getPropertySorting()

Returns the property sorting

string|bool|Comparator|Closure
getMethodSorting()

Returns the method sorting

$this
setGenerateScalarTypeHints(bool $generate)

Sets whether scalar type hints will be generated for method parameters (PHP 7)

bool
getGenerateReturnTypeHints()

Returns whether return type hints will be generated for method parameters (PHP 7)

$this
setGenerateReturnTypeHints(bool $generate)

Sets whether return type hints will be generated for method parameters (PHP 7)

$this
setSortingEnabled($enabled)

Returns whether sorting is enabled

$this
setUseStatementSorting($sorting)

Returns the use statement sorting

$this
setConstantSorting($sorting)

Returns the constant sorting

$this
setPropertySorting($sorting)

Returns the property sorting

$this
setMethodSorting($sorting)

Returns the method sorting

Details

at line line 24
__construct(array $options = array())

Creates a new configuration for code generator

Parameters

array $options

See also

https://php-code-generator.readthedocs.org/en/latest/generator.html

at line line 61
bool getGenerateDocblock()

Returns whether docblocks should be generated

Return Value

bool true if they will be generated and false if not

at line line 71
$this setGenerateDocblock(bool $generate)

Sets whether docblocks should be generated

Parameters

bool $generate true if they will be generated and false if not

Return Value

$this

at line line 84
bool getGenerateEmptyDocblock()

Returns whether empty docblocks are generated

Return Value

bool true if they will be generated and false if not

at line line 94
$this setGenerateEmptyDocblock(bool $generate)

Sets whether empty docblocks are generated

Parameters

bool $generate true if they will be generated and false if not

Return Value

$this

at line line 107
bool getGenerateScalarTypeHints()

Returns whether scalar type hints will be generated for method parameters (PHP 7)

Return Value

bool true if they will be generated and false if not

at line line 116
bool isSortingEnabled()

Returns whether sorting is enabled

Return Value

bool true if it is enabled and false if not

at line line 125
string|bool|Comparator|Closure getUseStatementSorting()

Returns the use statement sorting

Return Value

string|bool|Comparator|Closure

at line line 134
string|bool|Comparator|Closure getConstantSorting()

Returns the constant sorting

Return Value

string|bool|Comparator|Closure

at line line 143
string|bool|Comparator|Closure getPropertySorting()

Returns the property sorting

Return Value

string|bool|Comparator|Closure

at line line 152
string|bool|Comparator|Closure getMethodSorting()

Returns the method sorting

Return Value

string|bool|Comparator|Closure

at line line 162
$this setGenerateScalarTypeHints(bool $generate)

Sets whether scalar type hints will be generated for method parameters (PHP 7)

Parameters

bool $generate true if they will be generated and false if not

Return Value

$this

at line line 172
bool getGenerateReturnTypeHints()

Returns whether return type hints will be generated for method parameters (PHP 7)

Return Value

bool true if they will be generated and false if not

at line line 182
$this setGenerateReturnTypeHints(bool $generate)

Sets whether return type hints will be generated for method parameters (PHP 7)

Parameters

bool $generate true if they will be generated and false if not

Return Value

$this

at line line 193
$this setSortingEnabled($enabled)

Returns whether sorting is enabled

Parameters

$enabled bool true if it is enabled and false if not

Return Value

$this

at line line 204
$this setUseStatementSorting($sorting)

Returns the use statement sorting

Parameters

$sorting string|bool|Comparator|\Closure

Return Value

$this

at line line 215
$this setConstantSorting($sorting)

Returns the constant sorting

Parameters

$sorting string|bool|Comparator|\Closure

Return Value

$this

at line line 226
$this setPropertySorting($sorting)

Returns the property sorting

Parameters

$sorting string|bool|Comparator|\Closure

Return Value

$this

at line line 237
$this setMethodSorting($sorting)

Returns the method sorting

Parameters

$sorting string|bool|Comparator|\Closure

Return Value

$this