Update Array_ annotations, items are nullable (#696)

When used to destructure, items are optional. E.g. `[$a, , $b] = [1, 2, 3];`.
This commit is contained in:
Alex 2020-08-08 10:04:21 +02:00 committed by GitHub
parent f845568e1d
commit 54fc023b25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,13 +10,13 @@ class Array_ extends Expr
const KIND_LONG = 1; // array() syntax
const KIND_SHORT = 2; // [] syntax
/** @var ArrayItem[] Items */
/** @var (ArrayItem|null)[] Items */
public $items;
/**
* Constructs an array node.
*
* @param ArrayItem[] $items Items of the array
* @param (ArrayItem|null)[] $items Items of the array
* @param array $attributes Additional attributes
*/
public function __construct(array $items = [], array $attributes = []) {