Dependency updates and update version number

This commit is contained in:
Kode
2018-06-13 19:35:28 +01:00
parent 18ec208381
commit e3ec7de23a
1261 changed files with 45582 additions and 29687 deletions

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
namespace PhpParser\Node\Scalar;
@@ -15,13 +15,13 @@ class DNumber extends Scalar
* @param float $value Value of the number
* @param array $attributes Additional attributes
*/
public function __construct($value, array $attributes = array()) {
public function __construct(float $value, array $attributes = []) {
parent::__construct($attributes);
$this->value = $value;
}
public function getSubNodeNames() {
return array('value');
public function getSubNodeNames() : array {
return ['value'];
}
/**
@@ -33,7 +33,7 @@ class DNumber extends Scalar
*
* @return float The parsed number
*/
public static function parse($str) {
public static function parse(string $str) : float {
// if string contains any of .eE just cast it to float
if (false !== strpbrk($str, '.eE')) {
return (float) $str;
@@ -61,4 +61,8 @@ class DNumber extends Scalar
// dec
return (float) $str;
}
public function getType() : string {
return 'Scalar_DNumber';
}
}