Debian Codegraph @

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

raw
1 <?php declare(strict_types=1);
2
3 namespace PhpParser\Node\Stmt;
4
5 use PhpParser\Node;
6
7 class Const_ extends Node\Stmt {
8 /** @var Node\Const_[] Constant declarations */
9 public array $consts;
10 /** @var Node\AttributeGroup[] PHP attribute groups */
11 public array $attrGroups;
12
13 /**
14 * Constructs a const list node.
15 *
16 * @param Node\Const_[] $consts Constant declarations
17 * @param array<string, mixed> $attributes Additional attributes
18 * @param list<Node\AttributeGroup> $attrGroups PHP attribute groups
19 */
20 public function __construct(
21 array $consts,
22 array $attributes = [],
23 array $attrGroups = []
24 ) {
25 $this->attributes = $attributes;
26 $this->attrGroups = $attrGroups;
27 $this->consts = $consts;
28 }
29
30 public function getSubNodeNames(): array {
31 return ['attrGroups', 'consts'];
32 }
33
34 public function getType(): string {
35 return 'Stmt_Const';
36 }
37 }