Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 5fb285c0d0e3 |
children |
rev | line source |
---|---|
Chris@13 | 1 <?php declare(strict_types=1); |
Chris@0 | 2 |
Chris@0 | 3 namespace PhpParser\Node\Stmt; |
Chris@0 | 4 |
Chris@0 | 5 use PhpParser\Node; |
Chris@0 | 6 |
Chris@0 | 7 class DeclareDeclare extends Node\Stmt |
Chris@0 | 8 { |
Chris@13 | 9 /** @var Node\Identifier Key */ |
Chris@0 | 10 public $key; |
Chris@0 | 11 /** @var Node\Expr Value */ |
Chris@0 | 12 public $value; |
Chris@0 | 13 |
Chris@0 | 14 /** |
Chris@0 | 15 * Constructs a declare key=>value pair node. |
Chris@0 | 16 * |
Chris@13 | 17 * @param string|Node\Identifier $key Key |
Chris@13 | 18 * @param Node\Expr $value Value |
Chris@13 | 19 * @param array $attributes Additional attributes |
Chris@0 | 20 */ |
Chris@13 | 21 public function __construct($key, Node\Expr $value, array $attributes = []) { |
Chris@0 | 22 parent::__construct($attributes); |
Chris@13 | 23 $this->key = \is_string($key) ? new Node\Identifier($key) : $key; |
Chris@0 | 24 $this->value = $value; |
Chris@0 | 25 } |
Chris@0 | 26 |
Chris@13 | 27 public function getSubNodeNames() : array { |
Chris@13 | 28 return ['key', 'value']; |
Chris@13 | 29 } |
Chris@13 | 30 |
Chris@13 | 31 public function getType() : string { |
Chris@13 | 32 return 'Stmt_DeclareDeclare'; |
Chris@0 | 33 } |
Chris@0 | 34 } |