mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 13:21:12 +01:00
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:
parent
f845568e1d
commit
54fc023b25
@ -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 = []) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user