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;
|
||||
|
||||
@@ -22,13 +22,13 @@ class LNumber extends Scalar
|
||||
* @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 @@ class LNumber extends Scalar
|
||||
*
|
||||
* @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 @@ class LNumber extends Scalar
|
||||
$attributes['kind'] = LNumber::KIND_OCT;
|
||||
return new LNumber(intval($str, 8), $attributes);
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Scalar_LNumber';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user