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