mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 5370b722f8802f82ead12b12b2e3988f40192718
5370b722f8
[Php81] Remove cast check on NullToStrictStringFuncCallArgRector (#4320)
This commit is contained in:
parent
4c49964fc9
commit
6d1a7ecf0c
@ -6,7 +6,6 @@ namespace Rector\Php81\Rector\FuncCall;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\Assign;
|
||||
use PhpParser\Node\Expr\Cast\String_ as CastString_;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
@ -172,9 +171,6 @@ CODE_SAMPLE
|
||||
if ($this->shouldSkipTrait($argValue, $type, $isTrait)) {
|
||||
return null;
|
||||
}
|
||||
if ($this->isCastedReassign($argValue)) {
|
||||
return null;
|
||||
}
|
||||
$args[$position]->value = new CastString_($argValue);
|
||||
$funcCall->args = $args;
|
||||
return $funcCall;
|
||||
@ -195,18 +191,6 @@ CODE_SAMPLE
|
||||
}
|
||||
return \true;
|
||||
}
|
||||
private function isCastedReassign(Expr $expr) : bool
|
||||
{
|
||||
return (bool) $this->betterNodeFinder->findFirstPrevious($expr, function (Node $subNode) use($expr) : bool {
|
||||
if (!$subNode instanceof Assign) {
|
||||
return \false;
|
||||
}
|
||||
if (!$this->nodeComparator->areNodesEqual($subNode->var, $expr)) {
|
||||
return \false;
|
||||
}
|
||||
return $subNode->expr instanceof CastString_;
|
||||
});
|
||||
}
|
||||
private function isAnErrorTypeFromParentScope(Expr $expr, Scope $scope) : bool
|
||||
{
|
||||
$parentScope = $scope->getParentScope();
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '5c1fd4e0e38ad79fa64669ae8ba3ba6fb64cf051';
|
||||
public const PACKAGE_VERSION = '5370b722f8802f82ead12b12b2e3988f40192718';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-23 01:04:31';
|
||||
public const RELEASE_DATE = '2023-06-23 01:57:01';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInita06d3a11d9983f6acf250a3eb6e40f25::getLoader();
|
||||
return ComposerAutoloaderInitf10055ac6e56ac1cc4e6efb218ea487e::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInita06d3a11d9983f6acf250a3eb6e40f25
|
||||
class ComposerAutoloaderInitf10055ac6e56ac1cc4e6efb218ea487e
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInita06d3a11d9983f6acf250a3eb6e40f25
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInita06d3a11d9983f6acf250a3eb6e40f25', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitf10055ac6e56ac1cc4e6efb218ea487e', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInita06d3a11d9983f6acf250a3eb6e40f25', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitf10055ac6e56ac1cc4e6efb218ea487e', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita06d3a11d9983f6acf250a3eb6e40f25::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitf10055ac6e56ac1cc4e6efb218ea487e::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInita06d3a11d9983f6acf250a3eb6e40f25::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitf10055ac6e56ac1cc4e6efb218ea487e::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInita06d3a11d9983f6acf250a3eb6e40f25
|
||||
class ComposerStaticInitf10055ac6e56ac1cc4e6efb218ea487e
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3096,9 +3096,9 @@ class ComposerStaticInita06d3a11d9983f6acf250a3eb6e40f25
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInita06d3a11d9983f6acf250a3eb6e40f25::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInita06d3a11d9983f6acf250a3eb6e40f25::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInita06d3a11d9983f6acf250a3eb6e40f25::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf10055ac6e56ac1cc4e6efb218ea487e::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitf10055ac6e56ac1cc4e6efb218ea487e::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitf10055ac6e56ac1cc4e6efb218ea487e::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user