mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-05-31 00:59:09 +02:00
Fix ClassConst::$type phpdoc
The property should be nullable, and on 4.x we should convert string to Identifier. Fixes #939.
This commit is contained in:
parent
844c228bf2
commit
44fc92194b
@ -12,7 +12,7 @@ class ClassConst extends Node\Stmt
|
|||||||
public $consts;
|
public $consts;
|
||||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||||
public $attrGroups;
|
public $attrGroups;
|
||||||
/** @var Node\Identifier|Node\Name|Node\ComplexType Type declaration */
|
/** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */
|
||||||
public $type;
|
public $type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,7 +35,7 @@ class ClassConst extends Node\Stmt
|
|||||||
$this->flags = $flags;
|
$this->flags = $flags;
|
||||||
$this->consts = $consts;
|
$this->consts = $consts;
|
||||||
$this->attrGroups = $attrGroups;
|
$this->attrGroups = $attrGroups;
|
||||||
$this->type = $type;
|
$this->type = \is_string($type) ? new Node\Identifier($type) : $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSubNodeNames() : array {
|
public function getSubNodeNames() : array {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user