mirror of
https://github.com/rectorphp/rector.git
synced 2024-09-03 06:02:15 +00:00
Updated Rector to commit 8b4c7c5fd8
8b4c7c5fd8
[CodeQuality] Handle empty stmts on RemoveAlwaysTrueConditionSetInConstructorRector (#2281)
This commit is contained in:
parent
a93d572d86
commit
6feaa9edb7
@ -90,16 +90,17 @@ CODE_SAMPLE
|
||||
}
|
||||
/**
|
||||
* @param If_ $node
|
||||
* @return Stmt[]|null
|
||||
* @return null|\PhpParser\Node\Stmt\If_|mixed[]
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?array
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
{
|
||||
$ifStmt = $this->matchTruableIf($node);
|
||||
if (!$ifStmt instanceof \PhpParser\Node\Stmt\If_) {
|
||||
return null;
|
||||
}
|
||||
if ($ifStmt->stmts === null) {
|
||||
return null;
|
||||
if ($ifStmt->stmts === []) {
|
||||
$this->removeNode($ifStmt);
|
||||
return $ifStmt;
|
||||
}
|
||||
return $ifStmt->stmts;
|
||||
}
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'ebd4c3fee68fd84af59218fc0b0c4d744f2c7929';
|
||||
public const PACKAGE_VERSION = '8b4c7c5fd8ec764b1dc855d044658d91a81315b3';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-05-11 07:32:41';
|
||||
public const RELEASE_DATE = '2022-05-11 01:16:01';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27::getLoader();
|
||||
return ComposerAutoloaderInitdef0663bbddfe6c4b9647213fe734d55::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 ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27
|
||||
class ComposerAutoloaderInitdef0663bbddfe6c4b9647213fe734d55
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitdef0663bbddfe6c4b9647213fe734d55', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitdef0663bbddfe6c4b9647213fe734d55', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitb04a4961fd50d3dbf9568c461297ec27::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitdef0663bbddfe6c4b9647213fe734d55::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitb04a4961fd50d3dbf9568c461297ec27::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitdef0663bbddfe6c4b9647213fe734d55::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequireb04a4961fd50d3dbf9568c461297ec27($fileIdentifier, $file);
|
||||
composerRequiredef0663bbddfe6c4b9647213fe734d55($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequireb04a4961fd50d3dbf9568c461297ec27($fileIdentifier, $file)
|
||||
function composerRequiredef0663bbddfe6c4b9647213fe734d55($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 ComposerStaticInitb04a4961fd50d3dbf9568c461297ec27
|
||||
class ComposerStaticInitdef0663bbddfe6c4b9647213fe734d55
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
@ -3888,9 +3888,9 @@ class ComposerStaticInitb04a4961fd50d3dbf9568c461297ec27
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitb04a4961fd50d3dbf9568c461297ec27::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitb04a4961fd50d3dbf9568c461297ec27::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitb04a4961fd50d3dbf9568c461297ec27::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitdef0663bbddfe6c4b9647213fe734d55::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitdef0663bbddfe6c4b9647213fe734d55::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitdef0663bbddfe6c4b9647213fe734d55::$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('RectorPrefix20220511\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27', false) && !interface_exists('ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27', false) && !trait_exists('ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27', false)) {
|
||||
spl_autoload_call('RectorPrefix20220511\ComposerAutoloaderInitb04a4961fd50d3dbf9568c461297ec27');
|
||||
if (!class_exists('ComposerAutoloaderInitdef0663bbddfe6c4b9647213fe734d55', false) && !interface_exists('ComposerAutoloaderInitdef0663bbddfe6c4b9647213fe734d55', false) && !trait_exists('ComposerAutoloaderInitdef0663bbddfe6c4b9647213fe734d55', false)) {
|
||||
spl_autoload_call('RectorPrefix20220511\ComposerAutoloaderInitdef0663bbddfe6c4b9647213fe734d55');
|
||||
}
|
||||
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('RectorPrefix20220511\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20220511\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequireb04a4961fd50d3dbf9568c461297ec27')) {
|
||||
function composerRequireb04a4961fd50d3dbf9568c461297ec27() {
|
||||
return \RectorPrefix20220511\composerRequireb04a4961fd50d3dbf9568c461297ec27(...func_get_args());
|
||||
if (!function_exists('composerRequiredef0663bbddfe6c4b9647213fe734d55')) {
|
||||
function composerRequiredef0663bbddfe6c4b9647213fe734d55() {
|
||||
return \RectorPrefix20220511\composerRequiredef0663bbddfe6c4b9647213fe734d55(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
Loading…
Reference in New Issue
Block a user