comparison vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.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\Expr; 3 namespace PhpParser\Node\Expr;
4 4
5 use PhpParser\Node\Expr; 5 use PhpParser\Node\Expr;
6 use PhpParser\Node\Name; 6 use PhpParser\Node\Name;
7 use PhpParser\Node\VarLikeIdentifier;
7 8
8 class StaticPropertyFetch extends Expr 9 class StaticPropertyFetch extends Expr
9 { 10 {
10 /** @var Name|Expr Class name */ 11 /** @var Name|Expr Class name */
11 public $class; 12 public $class;
12 /** @var string|Expr Property name */ 13 /** @var VarLikeIdentifier|Expr Property name */
13 public $name; 14 public $name;
14 15
15 /** 16 /**
16 * Constructs a static property fetch node. 17 * Constructs a static property fetch node.
17 * 18 *
18 * @param Name|Expr $class Class name 19 * @param Name|Expr $class Class name
19 * @param string|Expr $name Property name 20 * @param string|VarLikeIdentifier|Expr $name Property name
20 * @param array $attributes Additional attributes 21 * @param array $attributes Additional attributes
21 */ 22 */
22 public function __construct($class, $name, array $attributes = array()) { 23 public function __construct($class, $name, array $attributes = []) {
23 parent::__construct($attributes); 24 parent::__construct($attributes);
24 $this->class = $class; 25 $this->class = $class;
25 $this->name = $name; 26 $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name;
26 } 27 }
27 28
28 public function getSubNodeNames() { 29 public function getSubNodeNames() : array {
29 return array('class', 'name'); 30 return ['class', 'name'];
31 }
32
33 public function getType() : string {
34 return 'Expr_StaticPropertyFetch';
30 } 35 }
31 } 36 }