-<?php
+<?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
* @param bool $byRef Whether to assign by reference
* @param array $attributes Additional attributes
*/
- public function __construct(Expr $value, Expr $key = null, $byRef = false, array $attributes = array()) {
+ public function __construct(Expr $value, Expr $key = null, bool $byRef = false, array $attributes = []) {
parent::__construct($attributes);
$this->key = $key;
$this->value = $value;
$this->byRef = $byRef;
}
- public function getSubNodeNames() {
- return array('key', 'value', 'byRef');
+ public function getSubNodeNames() : array {
+ return ['key', 'value', 'byRef'];
+ }
+
+ public function getType() : string {
+ return 'Expr_ArrayItem';
}
}