1 <?php declare(strict_types=1);
3 namespace PhpParser\Node\Stmt;
7 class DeclareDeclare extends Node\Stmt
9 /** @var Node\Identifier Key */
11 /** @var Node\Expr Value */
15 * Constructs a declare key=>value pair node.
17 * @param string|Node\Identifier $key Key
18 * @param Node\Expr $value Value
19 * @param array $attributes Additional attributes
21 public function __construct($key, Node\Expr $value, array $attributes = []) {
22 parent::__construct($attributes);
23 $this->key = \is_string($key) ? new Node\Identifier($key) : $key;
24 $this->value = $value;
27 public function getSubNodeNames() : array {
28 return ['key', 'value'];
31 public function getType() : string {
32 return 'Stmt_DeclareDeclare';