upgraded dependencies
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of Psy Shell.
|
||||
*
|
||||
* (c) 2012-2018 Justin Hileman
|
||||
* (c) 2012-2022 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -24,14 +24,17 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter
|
||||
|
||||
public function __construct($function, $parameter, array $opts)
|
||||
{
|
||||
$this->function = $function;
|
||||
$this->function = $function;
|
||||
$this->parameter = $parameter;
|
||||
$this->opts = $opts;
|
||||
$this->opts = $opts;
|
||||
}
|
||||
|
||||
/**
|
||||
* No class here.
|
||||
*
|
||||
* @todo remove \ReturnTypeWillChange attribute after dropping support for PHP 7.0 (when we can use nullable types)
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function getClass()
|
||||
{
|
||||
return;
|
||||
@@ -42,7 +45,7 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isArray()
|
||||
public function isArray(): bool
|
||||
{
|
||||
return \array_key_exists('isArray', $this->opts) && $this->opts['isArray'];
|
||||
}
|
||||
@@ -50,13 +53,18 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter
|
||||
/**
|
||||
* Get param default value.
|
||||
*
|
||||
* @todo remove \ReturnTypeWillChange attribute after dropping support for PHP 7.x (when we can use mixed type)
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function getDefaultValue()
|
||||
{
|
||||
if ($this->isDefaultValueAvailable()) {
|
||||
return $this->opts['defaultValue'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,7 +72,7 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->parameter;
|
||||
}
|
||||
@@ -74,7 +82,7 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isOptional()
|
||||
public function isOptional(): bool
|
||||
{
|
||||
return \array_key_exists('isOptional', $this->opts) && $this->opts['isOptional'];
|
||||
}
|
||||
@@ -84,7 +92,7 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isDefaultValueAvailable()
|
||||
public function isDefaultValueAvailable(): bool
|
||||
{
|
||||
return \array_key_exists('defaultValue', $this->opts);
|
||||
}
|
||||
@@ -96,7 +104,7 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isPassedByReference()
|
||||
public function isPassedByReference(): bool
|
||||
{
|
||||
return \array_key_exists('isPassedByReference', $this->opts) && $this->opts['isPassedByReference'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user