mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-17 15:18:17 +01:00
Add missing phpdoc annotations in AST nodes (#946)
This commit is contained in:
parent
8b9488e1e6
commit
f4961b89ac
@ -7,8 +7,10 @@ use PhpParser\Node\Expr;
|
|||||||
use PhpParser\Node\FunctionLike;
|
use PhpParser\Node\FunctionLike;
|
||||||
|
|
||||||
class ArrowFunction extends Expr implements FunctionLike {
|
class ArrowFunction extends Expr implements FunctionLike {
|
||||||
|
/** @var bool Whether the closure is static */
|
||||||
public bool $static;
|
public bool $static;
|
||||||
|
|
||||||
|
/** @var bool Whether to return by reference */
|
||||||
public bool $byRef;
|
public bool $byRef;
|
||||||
|
|
||||||
/** @var Node\Param[] */
|
/** @var Node\Param[] */
|
||||||
@ -17,6 +19,7 @@ class ArrowFunction extends Expr implements FunctionLike {
|
|||||||
/** @var null|Node\Identifier|Node\Name|Node\ComplexType */
|
/** @var null|Node\Identifier|Node\Name|Node\ComplexType */
|
||||||
public ?Node $returnType;
|
public ?Node $returnType;
|
||||||
|
|
||||||
|
/** @var Expr Expression body */
|
||||||
public Expr $expr;
|
public Expr $expr;
|
||||||
/** @var Node\AttributeGroup[] */
|
/** @var Node\AttributeGroup[] */
|
||||||
public array $attrGroups;
|
public array $attrGroups;
|
||||||
|
@ -6,12 +6,15 @@ use PhpParser\Node;
|
|||||||
use PhpParser\Node\MatchArm;
|
use PhpParser\Node\MatchArm;
|
||||||
|
|
||||||
class Match_ extends Node\Expr {
|
class Match_ extends Node\Expr {
|
||||||
|
/** @var Node\Expr Condition */
|
||||||
public Node\Expr $cond;
|
public Node\Expr $cond;
|
||||||
/** @var MatchArm[] */
|
/** @var MatchArm[] */
|
||||||
public array $arms;
|
public array $arms;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param Node\Expr $cond Condition
|
||||||
* @param MatchArm[] $arms
|
* @param MatchArm[] $arms
|
||||||
|
* @param array<string, mixed> $attributes Additional attributes
|
||||||
*/
|
*/
|
||||||
public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) {
|
public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) {
|
||||||
$this->attributes = $attributes;
|
$this->attributes = $attributes;
|
||||||
|
@ -17,6 +17,7 @@ class Param extends NodeAbstract {
|
|||||||
public Expr $var;
|
public Expr $var;
|
||||||
/** @var null|Expr Default value */
|
/** @var null|Expr Default value */
|
||||||
public ?Expr $default;
|
public ?Expr $default;
|
||||||
|
/** @var int Optional visibility flags */
|
||||||
public int $flags;
|
public int $flags;
|
||||||
/** @var AttributeGroup[] PHP attribute groups */
|
/** @var AttributeGroup[] PHP attribute groups */
|
||||||
public array $attrGroups;
|
public array $attrGroups;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user