| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use PhpParser\Node; |
|
| 6 | ||
| 7 | class DeclareDeclare extends Node\Stmt |
|
| 8 | { |
|
| 9 | /** @var string Key */ |
|
| 10 | public $key; |
|
| 11 | /** @var Node\Expr Value */ |
|
| 12 | public $value; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * Constructs a declare key=>value pair node. |
|
| 16 | * |
|
| 17 | * @param string $key Key |
|
| 18 | * @param Node\Expr $value Value |
|
| 19 | * @param array $attributes Additional attributes |
|
| 20 | */ |
|
| 21 | public function __construct($key, Node\Expr $value, array $attributes = array()) { |
|
| 22 | parent::__construct($attributes); |
|
| 23 | $this->key = $key; |
|
| 24 | $this->value = $value; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function getSubNodeNames() { |
|
| 28 | return array('key', 'value'); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use PhpParser\Node; |
|
| 6 | ||
| 7 | class Do_ extends Node\Stmt |
|
| 8 | { |
|
| 9 | /** @var Node\Expr Condition */ |
|
| 10 | public $cond; |
|
| 11 | /** @var Node[] Statements */ |
|
| 12 | public $stmts; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * Constructs a do while node. |
|
| 16 | * |
|
| 17 | * @param Node\Expr $cond Condition |
|
| 18 | * @param Node[] $stmts Statements |
|
| 19 | * @param array $attributes Additional attributes |
|
| 20 | */ |
|
| 21 | public function __construct(Node\Expr $cond, array $stmts = array(), array $attributes = array()) { |
|
| 22 | parent::__construct($attributes); |
|
| 23 | $this->cond = $cond; |
|
| 24 | $this->stmts = $stmts; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function getSubNodeNames() { |
|
| 28 | return array('cond', 'stmts'); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use PhpParser\Node; |
|
| 6 | ||
| 7 | class ElseIf_ extends Node\Stmt |
|
| 8 | { |
|
| 9 | /** @var Node\Expr Condition */ |
|
| 10 | public $cond; |
|
| 11 | /** @var Node[] Statements */ |
|
| 12 | public $stmts; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * Constructs an elseif node. |
|
| 16 | * |
|
| 17 | * @param Node\Expr $cond Condition |
|
| 18 | * @param Node[] $stmts Statements |
|
| 19 | * @param array $attributes Additional attributes |
|
| 20 | */ |
|
| 21 | public function __construct(Node\Expr $cond, array $stmts = array(), array $attributes = array()) { |
|
| 22 | parent::__construct($attributes); |
|
| 23 | $this->cond = $cond; |
|
| 24 | $this->stmts = $stmts; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function getSubNodeNames() { |
|
| 28 | return array('cond', 'stmts'); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use PhpParser\Node; |
|
| 6 | ||
| 7 | class PropertyProperty extends Node\Stmt |
|
| 8 | { |
|
| 9 | /** @var string Name */ |
|
| 10 | public $name; |
|
| 11 | /** @var null|Node\Expr Default */ |
|
| 12 | public $default; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * Constructs a class property node. |
|
| 16 | * |
|
| 17 | * @param string $name Name |
|
| 18 | * @param null|Node\Expr $default Default value |
|
| 19 | * @param array $attributes Additional attributes |
|
| 20 | */ |
|
| 21 | public function __construct($name, Node\Expr $default = null, array $attributes = array()) { |
|
| 22 | parent::__construct($attributes); |
|
| 23 | $this->name = $name; |
|
| 24 | $this->default = $default; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function getSubNodeNames() { |
|
| 28 | return array('name', 'default'); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use PhpParser\Node; |
|
| 6 | ||
| 7 | class StaticVar extends Node\Stmt |
|
| 8 | { |
|
| 9 | /** @var string Name */ |
|
| 10 | public $name; |
|
| 11 | /** @var null|Node\Expr Default value */ |
|
| 12 | public $default; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * Constructs a static variable node. |
|
| 16 | * |
|
| 17 | * @param string $name Name |
|
| 18 | * @param null|Node\Expr $default Default value |
|
| 19 | * @param array $attributes Additional attributes |
|
| 20 | */ |
|
| 21 | public function __construct($name, Node\Expr $default = null, array $attributes = array()) { |
|
| 22 | parent::__construct($attributes); |
|
| 23 | $this->name = $name; |
|
| 24 | $this->default = $default; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function getSubNodeNames() { |
|
| 28 | return array('name', 'default'); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use PhpParser\Node; |
|
| 6 | ||
| 7 | class Switch_ extends Node\Stmt |
|
| 8 | { |
|
| 9 | /** @var Node\Expr Condition */ |
|
| 10 | public $cond; |
|
| 11 | /** @var Case_[] Case list */ |
|
| 12 | public $cases; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * Constructs a case node. |
|
| 16 | * |
|
| 17 | * @param Node\Expr $cond Condition |
|
| 18 | * @param Case_[] $cases Case list |
|
| 19 | * @param array $attributes Additional attributes |
|
| 20 | */ |
|
| 21 | public function __construct(Node\Expr $cond, array $cases, array $attributes = array()) { |
|
| 22 | parent::__construct($attributes); |
|
| 23 | $this->cond = $cond; |
|
| 24 | $this->cases = $cases; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function getSubNodeNames() { |
|
| 28 | return array('cond', 'cases'); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use PhpParser\Node; |
|
| 6 | ||
| 7 | class While_ extends Node\Stmt |
|
| 8 | { |
|
| 9 | /** @var Node\Expr Condition */ |
|
| 10 | public $cond; |
|
| 11 | /** @var Node[] Statements */ |
|
| 12 | public $stmts; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * Constructs a while node. |
|
| 16 | * |
|
| 17 | * @param Node\Expr $cond Condition |
|
| 18 | * @param Node[] $stmts Statements |
|
| 19 | * @param array $attributes Additional attributes |
|
| 20 | */ |
|
| 21 | public function __construct(Node\Expr $cond, array $stmts = array(), array $attributes = array()) { |
|
| 22 | parent::__construct($attributes); |
|
| 23 | $this->cond = $cond; |
|
| 24 | $this->stmts = $stmts; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function getSubNodeNames() { |
|
| 28 | return array('cond', 'stmts'); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||