Laravel version update
Laravel version update
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user