Aggiornato Composer
This commit is contained in:
15
vendor/psy/psysh/src/Util/Docblock.php
vendored
15
vendor/psy/psysh/src/Util/Docblock.php
vendored
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of Psy Shell.
|
||||
*
|
||||
* (c) 2012-2022 Justin Hileman
|
||||
* (c) 2012-2023 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -74,7 +74,10 @@ class Docblock
|
||||
public function __construct(\Reflector $reflector)
|
||||
{
|
||||
$this->reflector = $reflector;
|
||||
$this->setComment($reflector->getDocComment());
|
||||
|
||||
if ($reflector instanceof \ReflectionClass || $reflector instanceof \ReflectionClassConstant || $reflector instanceof \ReflectionFunctionAbstract || $reflector instanceof \ReflectionProperty) {
|
||||
$this->setComment($reflector->getDocComment());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -198,8 +201,6 @@ class Docblock
|
||||
* Whether or not a docblock contains a given @tag.
|
||||
*
|
||||
* @param string $tag The name of the @tag to check for
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasTag(string $tag): bool
|
||||
{
|
||||
@@ -211,9 +212,9 @@ class Docblock
|
||||
*
|
||||
* @param string $tag
|
||||
*
|
||||
* @return array
|
||||
* @return array|null
|
||||
*/
|
||||
public function tag(string $tag): array
|
||||
public function tag(string $tag): ?array
|
||||
{
|
||||
return $this->hasTag($tag) ? $this->tags[$tag] : null;
|
||||
}
|
||||
@@ -222,8 +223,6 @@ class Docblock
|
||||
* Whether or not a string begins with a @tag.
|
||||
*
|
||||
* @param string $str
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isTagged(string $str): bool
|
||||
{
|
||||
|
||||
4
vendor/psy/psysh/src/Util/Json.php
vendored
4
vendor/psy/psysh/src/Util/Json.php
vendored
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of Psy Shell.
|
||||
*
|
||||
* (c) 2012-2022 Justin Hileman
|
||||
* (c) 2012-2023 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -21,8 +21,6 @@ class Json
|
||||
*
|
||||
* @param mixed $val
|
||||
* @param int $opt
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function encode($val, int $opt = 0): string
|
||||
{
|
||||
|
||||
13
vendor/psy/psysh/src/Util/Mirror.php
vendored
13
vendor/psy/psysh/src/Util/Mirror.php
vendored
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of Psy Shell.
|
||||
*
|
||||
* (c) 2012-2022 Justin Hileman
|
||||
* (c) 2012-2023 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -12,8 +12,7 @@
|
||||
namespace Psy\Util;
|
||||
|
||||
use Psy\Exception\RuntimeException;
|
||||
use Psy\Reflection\ReflectionClassConstant;
|
||||
use Psy\Reflection\ReflectionConstant_;
|
||||
use Psy\Reflection\ReflectionConstant;
|
||||
use Psy\Reflection\ReflectionNamespace;
|
||||
|
||||
/**
|
||||
@@ -43,13 +42,13 @@ class Mirror
|
||||
*
|
||||
* @return \Reflector
|
||||
*/
|
||||
public static function get($value, string $member = null, int $filter = 15): \Reflector
|
||||
public static function get($value, ?string $member = null, int $filter = 15): \Reflector
|
||||
{
|
||||
if ($member === null && \is_string($value)) {
|
||||
if (\function_exists($value)) {
|
||||
return new \ReflectionFunction($value);
|
||||
} elseif (\defined($value) || ReflectionConstant_::isMagicConstant($value)) {
|
||||
return new ReflectionConstant_($value);
|
||||
} elseif (\defined($value) || ReflectionConstant::isMagicConstant($value)) {
|
||||
return new ReflectionConstant($value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +57,7 @@ class Mirror
|
||||
if ($member === null) {
|
||||
return $class;
|
||||
} elseif ($filter & self::CONSTANT && $class->hasConstant($member)) {
|
||||
return ReflectionClassConstant::create($value, $member);
|
||||
return new \ReflectionClassConstant($value, $member);
|
||||
} elseif ($filter & self::METHOD && $class->hasMethod($member)) {
|
||||
return $class->getMethod($member);
|
||||
} elseif ($filter & self::PROPERTY && $class->hasProperty($member)) {
|
||||
|
||||
9
vendor/psy/psysh/src/Util/Str.php
vendored
9
vendor/psy/psysh/src/Util/Str.php
vendored
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of Psy Shell.
|
||||
*
|
||||
* (c) 2012-2022 Justin Hileman
|
||||
* (c) 2012-2023 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -56,12 +56,11 @@ EOS;
|
||||
* except for the \s sequence (ASCII space).
|
||||
*
|
||||
* @param string $input The string to decode
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function unvis(string $input): string
|
||||
{
|
||||
$output = \preg_replace_callback(self::UNVIS_RX, 'self::unvisReplace', $input);
|
||||
$output = \preg_replace_callback(self::UNVIS_RX, [self::class, 'unvisReplace'], $input);
|
||||
|
||||
// other escapes & octal are handled by stripcslashes
|
||||
return \stripcslashes($output);
|
||||
}
|
||||
@@ -70,8 +69,6 @@ EOS;
|
||||
* Callback for Str::unvis.
|
||||
*
|
||||
* @param array $match The matches passed by preg_replace_callback
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected static function unvisReplace(array $match): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user