Mercurial > hg > isophonics-drupal-site
comparison vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.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\Identifier; | |
6 | 7 |
7 class PropertyFetch extends Expr | 8 class PropertyFetch extends Expr |
8 { | 9 { |
9 /** @var Expr Variable holding object */ | 10 /** @var Expr Variable holding object */ |
10 public $var; | 11 public $var; |
11 /** @var string|Expr Property name */ | 12 /** @var Identifier|Expr Property name */ |
12 public $name; | 13 public $name; |
13 | 14 |
14 /** | 15 /** |
15 * Constructs a function call node. | 16 * Constructs a function call node. |
16 * | 17 * |
17 * @param Expr $var Variable holding object | 18 * @param Expr $var Variable holding object |
18 * @param string|Expr $name Property name | 19 * @param string|Identifier|Expr $name Property name |
19 * @param array $attributes Additional attributes | 20 * @param array $attributes Additional attributes |
20 */ | 21 */ |
21 public function __construct(Expr $var, $name, array $attributes = array()) { | 22 public function __construct(Expr $var, $name, array $attributes = []) { |
22 parent::__construct($attributes); | 23 parent::__construct($attributes); |
23 $this->var = $var; | 24 $this->var = $var; |
24 $this->name = $name; | 25 $this->name = \is_string($name) ? new Identifier($name) : $name; |
25 } | 26 } |
26 | 27 |
27 public function getSubNodeNames() { | 28 public function getSubNodeNames() : array { |
28 return array('var', 'name'); | 29 return ['var', 'name']; |
30 } | |
31 | |
32 public function getType() : string { | |
33 return 'Expr_PropertyFetch'; | |
29 } | 34 } |
30 } | 35 } |