Mercurial > hg > isophonics-drupal-site
comparison vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.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\Builder; | 3 namespace PhpParser\Builder; |
4 | 4 |
5 use PhpParser; | 5 use PhpParser; |
6 use PhpParser\BuilderHelpers; | |
6 | 7 |
7 abstract class Declaration extends PhpParser\BuilderAbstract | 8 abstract class Declaration implements PhpParser\Builder |
8 { | 9 { |
9 protected $attributes = array(); | 10 protected $attributes = []; |
10 | 11 |
11 abstract public function addStmt($stmt); | 12 abstract public function addStmt($stmt); |
12 | 13 |
13 /** | 14 /** |
14 * Adds multiple statements. | 15 * Adds multiple statements. |
31 * @param PhpParser\Comment\Doc|string $docComment Doc comment to set | 32 * @param PhpParser\Comment\Doc|string $docComment Doc comment to set |
32 * | 33 * |
33 * @return $this The builder instance (for fluid interface) | 34 * @return $this The builder instance (for fluid interface) |
34 */ | 35 */ |
35 public function setDocComment($docComment) { | 36 public function setDocComment($docComment) { |
36 $this->attributes['comments'] = array( | 37 $this->attributes['comments'] = [ |
37 $this->normalizeDocComment($docComment) | 38 BuilderHelpers::normalizeDocComment($docComment) |
38 ); | 39 ]; |
39 | 40 |
40 return $this; | 41 return $this; |
41 } | 42 } |
42 } | 43 } |