Файл: vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php
Строк: 43
<?php declare(strict_types=1);
namespace PhpParserNodeStmt;
use PhpParserNode;
use PhpParserNodeAttributeGroup;
class EnumCase extends NodeStmt
{
/** @var NodeIdentifier Enum case name */
public $name;
/** @var NodeExpr|null Enum case expression */
public $expr;
/** @var NodeAttributeGroup[] PHP attribute groups */
public $attrGroups;
/**
* @param string|NodeIdentifier $name Enum case name
* @param NodeExpr|null $expr Enum case expression
* @param AttributeGroup[] $attrGroups PHP attribute groups
* @param array $attributes Additional attributes
*/
public function __construct($name, NodeExpr $expr = null, array $attrGroups = [], array $attributes = []) {
parent::__construct($attributes);
$this->name = is_string($name) ? new NodeIdentifier($name) : $name;
$this->expr = $expr;
$this->attrGroups = $attrGroups;
}
public function getSubNodeNames() : array {
return ['attrGroups', 'name', 'expr'];
}
public function getType() : string {
return 'Stmt_EnumCase';
}
}