class Case_
Hierarchy
- class \PhpParser\Node\Stmt\Case_ extends \Node\Stmt
Expanded class hierarchy of Case_
1 file declares its use of Case_
- CyclomaticComplexityCalculatingVisitor.php in vendor/
sebastian/ complexity/ src/ Visitor/ CyclomaticComplexityCalculatingVisitor.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Stmt/ Case_.php, line 7
Namespace
PhpParser\Node\StmtView source
class Case_ extends Node\Stmt {
/** @var null|Node\Expr Condition (null for default) */
public ?Node\Expr $cond;
/** @var Node\Stmt[] Statements */
public array $stmts;
/**
* Constructs a case node.
*
* @param null|Node\Expr $cond Condition (null for default)
* @param Node\Stmt[] $stmts Statements
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) {
$this->attributes = $attributes;
$this->cond = $cond;
$this->stmts = $stmts;
}
public function getSubNodeNames() : array {
return [
'cond',
'stmts',
];
}
public function getType() : string {
return 'Stmt_Case';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
Case_::$cond | public | property | @var null|Node\Expr Condition (null for default) |
Case_::$stmts | public | property | @var Node\Stmt[] Statements |
Case_::getSubNodeNames | public | function | |
Case_::getType | public | function | |
Case_::__construct | public | function | Constructs a case node. |