Mercurial > hg > isophonics-drupal-site
diff vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.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 |
line wrap: on
line diff
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php Fri Feb 23 15:52:07 2018 +0000 +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php Mon Apr 23 09:33:26 2018 +0100 @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); namespace PhpParser\Node\Scalar; @@ -22,13 +22,13 @@ * @param int $value Value of the number * @param array $attributes Additional attributes */ - public function __construct($value, array $attributes = array()) { + public function __construct(int $value, array $attributes = []) { parent::__construct($attributes); $this->value = $value; } - public function getSubNodeNames() { - return array('value'); + public function getSubNodeNames() : array { + return ['value']; } /** @@ -40,7 +40,7 @@ * * @return LNumber The constructed LNumber, including kind attribute */ - public static function fromString($str, array $attributes = array(), $allowInvalidOctal = false) { + public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber { if ('0' !== $str[0] || '0' === $str) { $attributes['kind'] = LNumber::KIND_DEC; return new LNumber((int) $str, $attributes); @@ -64,4 +64,8 @@ $attributes['kind'] = LNumber::KIND_OCT; return new LNumber(intval($str, 8), $attributes); } + + public function getType() : string { + return 'Scalar_LNumber'; + } }