PluginProbe
WPIDE – File Manager & Code Editor / 3.5.9
WPIDE – File Manager & Code Editor v3.5.9
3.5.9 3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 All 55 releases
wpide / vendor / nikic / php-parser / lib / PhpParser / Node / Param.php

Param.php in WPIDE – File Manager & Code Editor 3.5.9, at vendor/nikic/php-parser/lib/PhpParser/Node/Param.php

61 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php declare(strict_types=1);
2
3 namespace PhpParser\Node;
4
5 use PhpParser\NodeAbstract;
6
7 class Param extends NodeAbstract
8 {
9 /** @var null|Identifier|Name|ComplexType Type declaration */
10 public $type;
11 /** @var bool Whether parameter is passed by reference */
12 public $byRef;
13 /** @var bool Whether this is a variadic argument */
14 public $variadic;
15 /** @var Expr\Variable|Expr\Error Parameter variable */
16 public $var;
17 /** @var null|Expr Default value */
18 public $default;
19 /** @var int */
20 public $flags;
21 /** @var AttributeGroup[] PHP attribute groups */
22 public $attrGroups;
23
24 /**
25 * Constructs a parameter node.
26 *
27 * @param Expr\Variable|Expr\Error $var Parameter variable
28 * @param null|Expr $default Default value
29 * @param null|string|Identifier|Name|ComplexType $type Type declaration
30 * @param bool $byRef Whether is passed by reference
31 * @param bool $variadic Whether this is a variadic argument
32 * @param array $attributes Additional attributes
33 * @param int $flags Optional visibility flags
34 * @param AttributeGroup[] $attrGroups PHP attribute groups
35 */
36 public function __construct(
37 $var, ?Expr $default = null, $type = null,
38 bool $byRef = false, bool $variadic = false,
39 array $attributes = [],
40 int $flags = 0,
41 array $attrGroups = []
42 ) {
43 $this->attributes = $attributes;
44 $this->type = \is_string($type) ? new Identifier($type) : $type;
45 $this->byRef = $byRef;
46 $this->variadic = $variadic;
47 $this->var = $var;
48 $this->default = $default;
49 $this->flags = $flags;
50 $this->attrGroups = $attrGroups;
51 }
52
53 public function getSubNodeNames() : array {
54 return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default'];
55 }
56
57 public function getType() : string {
58 return 'Param';
59 }
60 }
61