mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
Updated Rector to commit 9247ba932a695da7fff0d86d7431197cccda974b
9247ba932a
[CodeQuality][EarlyReturn][TypeDeclaration] Handle ChangeOrIfReturnToEarlyReturnRector + ChangeAndIfToEarlyReturnRector + AddArrayReturnDocTypeRector + NarrowUnionTypeDocRector (#795)
This commit is contained in:
parent
1fc57a8fc7
commit
798dab0ffa
@ -80,10 +80,12 @@ CODE_SAMPLE
|
||||
$this->changeDocObjectWithoutClassType($paramType, $key, $phpDocInfo);
|
||||
}
|
||||
}
|
||||
if ($phpDocInfo->hasChanged()) {
|
||||
$node->setAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::HAS_PHP_DOC_INFO_JUST_CHANGED, \true);
|
||||
return $node;
|
||||
if (!$phpDocInfo->hasChanged()) {
|
||||
return null;
|
||||
}
|
||||
$node->setAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::HAS_PHP_DOC_INFO_JUST_CHANGED, \true);
|
||||
// @see https://github.com/rectorphp/rector-src/pull/795
|
||||
// avoid duplicated ifs and returns when combined with ChangeOrIfReturnToEarlyReturnRector, ChangeAndIfToEarlyReturnRector, and AddArrayReturnDocTypeRector
|
||||
return null;
|
||||
}
|
||||
private function changeDocObjectWithoutClassType(\PHPStan\Type\UnionType $unionType, int $key, \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo $phpDocInfo) : void
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '3e5ecbc2510f756ac0ef9c5b6f0526c451ae5a98';
|
||||
public const PACKAGE_VERSION = '9247ba932a695da7fff0d86d7431197cccda974b';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-08-31 11:31:40';
|
||||
public const RELEASE_DATE = '2021-08-31 13:32:42';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210831\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8::getLoader();
|
||||
return ComposerAutoloaderInitcfaa75631109e8039e47a3ab75c7dc83::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 ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8
|
||||
class ComposerAutoloaderInitcfaa75631109e8039e47a3ab75c7dc83
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitcfaa75631109e8039e47a3ab75c7dc83', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitcfaa75631109e8039e47a3ab75c7dc83', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite28a51994361014f754d96ab7165a7e8::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitcfaa75631109e8039e47a3ab75c7dc83::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInite28a51994361014f754d96ab7165a7e8::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitcfaa75631109e8039e47a3ab75c7dc83::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequiree28a51994361014f754d96ab7165a7e8($fileIdentifier, $file);
|
||||
composerRequirecfaa75631109e8039e47a3ab75c7dc83($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequiree28a51994361014f754d96ab7165a7e8($fileIdentifier, $file)
|
||||
function composerRequirecfaa75631109e8039e47a3ab75c7dc83($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInite28a51994361014f754d96ab7165a7e8
|
||||
class ComposerStaticInitcfaa75631109e8039e47a3ab75c7dc83
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
@ -3856,9 +3856,9 @@ class ComposerStaticInite28a51994361014f754d96ab7165a7e8
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite28a51994361014f754d96ab7165a7e8::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite28a51994361014f754d96ab7165a7e8::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite28a51994361014f754d96ab7165a7e8::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitcfaa75631109e8039e47a3ab75c7dc83::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitcfaa75631109e8039e47a3ab75c7dc83::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitcfaa75631109e8039e47a3ab75c7dc83::$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('RectorPrefix20210831\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8', false) && !interface_exists('ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8', false) && !trait_exists('ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8', false)) {
|
||||
spl_autoload_call('RectorPrefix20210831\ComposerAutoloaderInite28a51994361014f754d96ab7165a7e8');
|
||||
if (!class_exists('ComposerAutoloaderInitcfaa75631109e8039e47a3ab75c7dc83', false) && !interface_exists('ComposerAutoloaderInitcfaa75631109e8039e47a3ab75c7dc83', false) && !trait_exists('ComposerAutoloaderInitcfaa75631109e8039e47a3ab75c7dc83', false)) {
|
||||
spl_autoload_call('RectorPrefix20210831\ComposerAutoloaderInitcfaa75631109e8039e47a3ab75c7dc83');
|
||||
}
|
||||
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('RectorPrefix20210831\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
@ -3311,9 +3311,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20210831\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequiree28a51994361014f754d96ab7165a7e8')) {
|
||||
function composerRequiree28a51994361014f754d96ab7165a7e8() {
|
||||
return \RectorPrefix20210831\composerRequiree28a51994361014f754d96ab7165a7e8(...func_get_args());
|
||||
if (!function_exists('composerRequirecfaa75631109e8039e47a3ab75c7dc83')) {
|
||||
function composerRequirecfaa75631109e8039e47a3ab75c7dc83() {
|
||||
return \RectorPrefix20210831\composerRequirecfaa75631109e8039e47a3ab75c7dc83(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user