Mercurial > hg > isophonics-drupal-site
comparison vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.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 | 6 |
7 class If_ extends Node\Stmt | 7 class If_ extends Node\Stmt |
8 { | 8 { |
9 /** @var Node\Expr Condition expression */ | 9 /** @var Node\Expr Condition expression */ |
10 public $cond; | 10 public $cond; |
11 /** @var Node[] Statements */ | 11 /** @var Node\Stmt[] Statements */ |
12 public $stmts; | 12 public $stmts; |
13 /** @var ElseIf_[] Elseif clauses */ | 13 /** @var ElseIf_[] Elseif clauses */ |
14 public $elseifs; | 14 public $elseifs; |
15 /** @var null|Else_ Else clause */ | 15 /** @var null|Else_ Else clause */ |
16 public $else; | 16 public $else; |
23 * 'stmts' => array(): Statements | 23 * 'stmts' => array(): Statements |
24 * 'elseifs' => array(): Elseif clauses | 24 * 'elseifs' => array(): Elseif clauses |
25 * 'else' => null : Else clause | 25 * 'else' => null : Else clause |
26 * @param array $attributes Additional attributes | 26 * @param array $attributes Additional attributes |
27 */ | 27 */ |
28 public function __construct(Node\Expr $cond, array $subNodes = array(), array $attributes = array()) { | 28 public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { |
29 parent::__construct($attributes); | 29 parent::__construct($attributes); |
30 $this->cond = $cond; | 30 $this->cond = $cond; |
31 $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); | 31 $this->stmts = $subNodes['stmts'] ?? []; |
32 $this->elseifs = isset($subNodes['elseifs']) ? $subNodes['elseifs'] : array(); | 32 $this->elseifs = $subNodes['elseifs'] ?? []; |
33 $this->else = isset($subNodes['else']) ? $subNodes['else'] : null; | 33 $this->else = $subNodes['else'] ?? null; |
34 } | 34 } |
35 | 35 |
36 public function getSubNodeNames() { | 36 public function getSubNodeNames() : array { |
37 return array('cond', 'stmts', 'elseifs', 'else'); | 37 return ['cond', 'stmts', 'elseifs', 'else']; |
38 } | |
39 | |
40 public function getType() : string { | |
41 return 'Stmt_If'; | |
38 } | 42 } |
39 } | 43 } |