SwitchStatement
class SwitchStatement
Properties
protected array | $branchesCode | ||
protected string | $defaultCode |
Methods
__construct(array $branchesCode, string $defaultCode = '')
No description
static string
generate(string $expr, array $branchesCode, string $defaultCode = '')
Create and return the source code for a switch statement
string
getSource(string $expr)
Return the source code for this switch statement
array
getValuesPerCodeBranch()
Group branches by their content and return the switch values for each branch
Details
at line 26
__construct(array $branchesCode, string $defaultCode = '')
No description
at line 42
static string
generate(string $expr, array $branchesCode, string $defaultCode = '')
Create and return the source code for a switch statement
at line 55
protected string
getSource(string $expr)
Return the source code for this switch statement
at line 80
protected array
getValuesPerCodeBranch()
Group branches by their content and return the switch values for each branch