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