function EnumCase::__construct
Same name in this branch
- 11.1.x vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php \PhpParser\Builder\EnumCase::__construct()
Parameters
string|Node\Identifier $name Enum case name:
Node\Expr|null $expr Enum case expression:
list<AttributeGroup> $attrGroups PHP attribute groups:
array<string, mixed> $attributes Additional attributes:
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Stmt/ EnumCase.php, line 22
Class
Namespace
PhpParser\Node\StmtCode
public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) {
parent::__construct($attributes);
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
$this->expr = $expr;
$this->attrGroups = $attrGroups;
}