Debian Codegraph @

vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php

raw
1 <?php declare(strict_types=1);
2
3 namespace PhpParser\Node\Stmt;
4
5 use PhpParser\Node\Stmt;
6
7 class Block extends Stmt {
8 /** @var Stmt[] Statements */
9 public array $stmts;
10
11 /**
12 * A block of statements.
13 *
14 * @param Stmt[] $stmts Statements
15 * @param array<string, mixed> $attributes Additional attributes
16 */
17 public function __construct(array $stmts, array $attributes = []) {
18 $this->attributes = $attributes;
19 $this->stmts = $stmts;
20 }
21
22 public function getType(): string {
23 return 'Stmt_Block';
24 }
25
26 public function getSubNodeNames(): array {
27 return ['stmts'];
28 }
29 }