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