Mercurial > hg > isophonics-drupal-site
comparison vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.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 Catch_ extends Node\Stmt | 8 class Catch_ extends Node\Stmt |
8 { | 9 { |
9 /** @var Node\Name[] Types of exceptions to catch */ | 10 /** @var Node\Name[] Types of exceptions to catch */ |
10 public $types; | 11 public $types; |
11 /** @var string Variable for exception */ | 12 /** @var Expr\Variable Variable for exception */ |
12 public $var; | 13 public $var; |
13 /** @var Node[] Statements */ | 14 /** @var Node\Stmt[] Statements */ |
14 public $stmts; | 15 public $stmts; |
15 | 16 |
16 /** | 17 /** |
17 * Constructs a catch node. | 18 * Constructs a catch node. |
18 * | 19 * |
19 * @param Node\Name[] $types Types of exceptions to catch | 20 * @param Node\Name[] $types Types of exceptions to catch |
20 * @param string $var Variable for exception | 21 * @param Expr\Variable $var Variable for exception |
21 * @param Node[] $stmts Statements | 22 * @param Node\Stmt[] $stmts Statements |
22 * @param array $attributes Additional attributes | 23 * @param array $attributes Additional attributes |
23 */ | 24 */ |
24 public function __construct(array $types, $var, array $stmts = array(), array $attributes = array()) { | 25 public function __construct( |
26 array $types, Expr\Variable $var, array $stmts = [], array $attributes = [] | |
27 ) { | |
25 parent::__construct($attributes); | 28 parent::__construct($attributes); |
26 $this->types = $types; | 29 $this->types = $types; |
27 $this->var = $var; | 30 $this->var = $var; |
28 $this->stmts = $stmts; | 31 $this->stmts = $stmts; |
29 } | 32 } |
30 | 33 |
31 public function getSubNodeNames() { | 34 public function getSubNodeNames() : array { |
32 return array('types', 'var', 'stmts'); | 35 return ['types', 'var', 'stmts']; |
36 } | |
37 | |
38 public function getType() : string { | |
39 return 'Stmt_Catch'; | |
33 } | 40 } |
34 } | 41 } |