Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/test/code/formatPreservation/modifierChange.test @ 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 | |
children |
rev | line source |
---|---|
Chris@13 | 1 Modifier change |
Chris@13 | 2 ----- |
Chris@13 | 3 <?php |
Chris@13 | 4 class Foo {} |
Chris@13 | 5 abstract class Bar { |
Chris@13 | 6 const |
Chris@13 | 7 FOO = 42; |
Chris@13 | 8 |
Chris@13 | 9 var $foo |
Chris@13 | 10 = 24; |
Chris@13 | 11 |
Chris@13 | 12 public function |
Chris@13 | 13 foo() {} |
Chris@13 | 14 } |
Chris@13 | 15 ----- |
Chris@13 | 16 $stmts[0]->flags = Stmt\Class_::MODIFIER_ABSTRACT; |
Chris@13 | 17 $stmts[1]->flags = 0; |
Chris@13 | 18 $stmts[1]->stmts[0]->flags = Stmt\Class_::MODIFIER_PRIVATE; |
Chris@13 | 19 $stmts[1]->stmts[1]->flags = Stmt\Class_::MODIFIER_PROTECTED; |
Chris@13 | 20 $stmts[1]->stmts[2]->flags |= Stmt\Class_::MODIFIER_FINAL; |
Chris@13 | 21 ----- |
Chris@13 | 22 <?php |
Chris@13 | 23 abstract class Foo {} |
Chris@13 | 24 class Bar { |
Chris@13 | 25 private const |
Chris@13 | 26 FOO = 42; |
Chris@13 | 27 |
Chris@13 | 28 protected $foo |
Chris@13 | 29 = 24; |
Chris@13 | 30 |
Chris@13 | 31 public final function |
Chris@13 | 32 foo() {} |
Chris@13 | 33 } |