comparison vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php @ 13:5fb285c0d0e3

Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've been lucky to get away with this so far, as we don't support self-registration which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5 was vulnerable to.
author Chris Cannam
date Mon, 23 Apr 2018 09:33:26 +0100
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
12:7a779792577d 13:5fb285c0d0e3
1 <?php 1 <?php declare(strict_types=1);
2 2
3 namespace PhpParser\Node\Stmt; 3 namespace PhpParser\Node\Stmt;
4 4
5 use PhpParser\Node; 5 use PhpParser\Node;
6 use PhpParser\Node\Expr;
6 7
7 class StaticVar extends Node\Stmt 8 class StaticVar extends Node\Stmt
8 { 9 {
9 /** @var string Name */ 10 /** @var Expr\Variable Variable */
10 public $name; 11 public $var;
11 /** @var null|Node\Expr Default value */ 12 /** @var null|Node\Expr Default value */
12 public $default; 13 public $default;
13 14
14 /** 15 /**
15 * Constructs a static variable node. 16 * Constructs a static variable node.
16 * 17 *
17 * @param string $name Name 18 * @param Expr\Variable $var Name
18 * @param null|Node\Expr $default Default value 19 * @param null|Node\Expr $default Default value
19 * @param array $attributes Additional attributes 20 * @param array $attributes Additional attributes
20 */ 21 */
21 public function __construct($name, Node\Expr $default = null, array $attributes = array()) { 22 public function __construct(
23 Expr\Variable $var, Node\Expr $default = null, array $attributes = []
24 ) {
22 parent::__construct($attributes); 25 parent::__construct($attributes);
23 $this->name = $name; 26 $this->var = $var;
24 $this->default = $default; 27 $this->default = $default;
25 } 28 }
26 29
27 public function getSubNodeNames() { 30 public function getSubNodeNames() : array {
28 return array('name', 'default'); 31 return ['var', 'default'];
32 }
33
34 public function getType() : string {
35 return 'Stmt_StaticVar';
29 } 36 }
30 } 37 }