Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / lib / PhpParser / Node / Param.php
1 <?php
2
3 namespace PhpParser\Node;
4
5 use PhpParser\NodeAbstract;
6
7 class Param extends NodeAbstract
8 {
9     /** @var null|string|Name|NullableType Typehint */
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 string Name */
16     public $name;
17     /** @var null|Expr Default value */
18     public $default;
19
20     /**
21      * Constructs a parameter node.
22      *
23      * @param string                        $name       Name
24      * @param null|Expr                     $default    Default value
25      * @param null|string|Name|NullableType $type       Typehint
26      * @param bool                          $byRef      Whether is passed by reference
27      * @param bool                          $variadic   Whether this is a variadic argument
28      * @param array                         $attributes Additional attributes
29      */
30     public function __construct($name, Expr $default = null, $type = null, $byRef = false, $variadic = false, array $attributes = array()) {
31         parent::__construct($attributes);
32         $this->type = $type;
33         $this->byRef = $byRef;
34         $this->variadic = $variadic;
35         $this->name = $name;
36         $this->default = $default;
37     }
38
39     public function getSubNodeNames() {
40         return array('type', 'byRef', 'variadic', 'name', 'default');
41     }
42 }