mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-03 09:50:49 +00:00
Updated Rector to commit 3135f29362
3135f29362
[DeadCode] Ensure has stmts on RemoveDeadInstanceOfRector (#2252)
This commit is contained in:
parent
fe23d4f8ca
commit
4b5a7031be
|
@ -99,9 +99,9 @@ CODE_SAMPLE
|
|||
}
|
||||
/**
|
||||
* @param If_ $node
|
||||
* @return Stmt[]|null
|
||||
* @return null|mixed[]|\PhpParser\Node\Stmt\If_
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?array
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
{
|
||||
if (!$this->ifManipulator->isIfWithoutElseAndElseIfs($node)) {
|
||||
return null;
|
||||
|
@ -122,9 +122,9 @@ CODE_SAMPLE
|
|||
return null;
|
||||
}
|
||||
/**
|
||||
* @return Stmt[]|null
|
||||
* @return null|mixed[]|\PhpParser\Node\Stmt\If_
|
||||
*/
|
||||
private function processMayDeadInstanceOf(\PhpParser\Node\Stmt\If_ $if, \PhpParser\Node\Expr\Instanceof_ $instanceof) : ?array
|
||||
private function processMayDeadInstanceOf(\PhpParser\Node\Stmt\If_ $if, \PhpParser\Node\Expr\Instanceof_ $instanceof)
|
||||
{
|
||||
if (!$instanceof->class instanceof \PhpParser\Node\Name) {
|
||||
return null;
|
||||
|
@ -141,11 +141,11 @@ CODE_SAMPLE
|
|||
if ($this->shouldSkipFromNotTypedParam($instanceof)) {
|
||||
return null;
|
||||
}
|
||||
$this->removeNode($if);
|
||||
if ($if->cond === $instanceof) {
|
||||
if ($if->cond === $instanceof && $if->stmts !== []) {
|
||||
return $if->stmts;
|
||||
}
|
||||
return null;
|
||||
$this->removeNode($if);
|
||||
return $if;
|
||||
}
|
||||
private function shouldSkipFromNotTypedParam(\PhpParser\Node\Expr\Instanceof_ $instanceof) : bool
|
||||
{
|
||||
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'c91f3ad6299b08583c2b994e6c09592f6ddfc200';
|
||||
public const PACKAGE_VERSION = '3135f293622611407e6fb403b335077d16bfee74';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-05-07 09:32:53';
|
||||
public const RELEASE_DATE = '2022-05-07 10:18:33';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3::getLoader();
|
||||
return ComposerAutoloaderInit2a40621b066f2e2762f774b705912004::getLoader();
|
||||
|
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3
|
||||
class ComposerAutoloaderInit2a40621b066f2e2762f774b705912004
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit4b388253d900892c28af1b0e48f613f3::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2a40621b066f2e2762f774b705912004::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit4b388253d900892c28af1b0e48f613f3::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit2a40621b066f2e2762f774b705912004::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire4b388253d900892c28af1b0e48f613f3($fileIdentifier, $file);
|
||||
composerRequire2a40621b066f2e2762f774b705912004($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire4b388253d900892c28af1b0e48f613f3($fileIdentifier, $file)
|
||||
function composerRequire2a40621b066f2e2762f774b705912004($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 ComposerStaticInit4b388253d900892c28af1b0e48f613f3
|
||||
class ComposerStaticInit2a40621b066f2e2762f774b705912004
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
|
@ -3882,9 +3882,9 @@ class ComposerStaticInit4b388253d900892c28af1b0e48f613f3
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit4b388253d900892c28af1b0e48f613f3::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit4b388253d900892c28af1b0e48f613f3::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit4b388253d900892c28af1b0e48f613f3::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2a40621b066f2e2762f774b705912004::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2a40621b066f2e2762f774b705912004::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2a40621b066f2e2762f774b705912004::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
|
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
|||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220507\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3', false) && !interface_exists('ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3', false) && !trait_exists('ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3', false)) {
|
||||
spl_autoload_call('RectorPrefix20220507\ComposerAutoloaderInit4b388253d900892c28af1b0e48f613f3');
|
||||
if (!class_exists('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', false) && !interface_exists('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', false) && !trait_exists('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', false)) {
|
||||
spl_autoload_call('RectorPrefix20220507\ComposerAutoloaderInit2a40621b066f2e2762f774b705912004');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220507\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
|
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20220507\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire4b388253d900892c28af1b0e48f613f3')) {
|
||||
function composerRequire4b388253d900892c28af1b0e48f613f3() {
|
||||
return \RectorPrefix20220507\composerRequire4b388253d900892c28af1b0e48f613f3(...func_get_args());
|
||||
if (!function_exists('composerRequire2a40621b066f2e2762f774b705912004')) {
|
||||
function composerRequire2a40621b066f2e2762f774b705912004() {
|
||||
return \RectorPrefix20220507\composerRequire2a40621b066f2e2762f774b705912004(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user