-<?php
+<?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
* @param null|Expr $key Key expression
* @param array $attributes Additional attributes
*/
- public function __construct(Expr $value = null, Expr $key = null, array $attributes = array()) {
+ public function __construct(Expr $value = null, Expr $key = null, array $attributes = []) {
parent::__construct($attributes);
$this->key = $key;
$this->value = $value;
}
- public function getSubNodeNames() {
- return array('key', 'value');
+ public function getSubNodeNames() : array {
+ return ['key', 'value'];
+ }
+
+ public function getType() : string {
+ return 'Expr_Yield';
}
}