Updated Rector to commit d0c25cc4b9

d0c25cc4b9 [TypeDeclaration] Register ReturnAnnotationIncorrectNullableRector and VarAnnotationIncorrectNullableRector to type-declaration config set (#2062)
This commit is contained in:
Tomas Votruba 2022-04-13 16:41:06 +00:00
parent 863e58bc5e
commit be26c813d6
10 changed files with 26 additions and 23 deletions

View File

@ -8,11 +8,13 @@ use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayParamDocTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnAnnotationIncorrectNullableRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector;
use Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector;
use Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector;
use Rector\TypeDeclaration\Rector\Property\PropertyTypeDeclarationRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
use Rector\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector;
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
$services = $rectorConfig->services();
$services->set(\Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector::class);
@ -24,4 +26,6 @@ return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
$services->set(\Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector::class);
$services->set(\Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector::class);
$services->set(\Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector::class);
$services->set(\Rector\TypeDeclaration\Rector\ClassMethod\ReturnAnnotationIncorrectNullableRector::class);
$services->set(\Rector\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector::class);
};

View File

@ -170,7 +170,7 @@ CODE_SAMPLE
return new \PhpParser\Node\Expr\BinaryOp\Greater($funcCall, $lNumber);
}
/**
* @return Identical|NotIdentical
* @return Identical|NotIdentical|null
*/
private function resolveArray(bool $isNegated, \PhpParser\Node\Expr $expr) : ?\PhpParser\Node\Expr\BinaryOp
{

View File

@ -84,7 +84,6 @@ CODE_SAMPLE
return new \PhpParser\Node\Expr\BinaryOp\NotIdentical($funcCall, $this->nodeFactory->createFalse());
}
/**
* @return FuncCall
* @param \PhpParser\Node\Expr\BooleanNot|\PhpParser\Node\Expr\FuncCall $expr
*/
private function matchStrContainsOrNotStrContains($expr) : ?\PhpParser\Node\Expr\FuncCall

View File

@ -125,7 +125,7 @@ CODE_SAMPLE
return $stmts;
}
/**
* @return Name|Identifier
* @return Identifier|Name|null
* @param \PhpParser\Node\Identifier|\PhpParser\Node\Name $node
*/
private function processNameOrIdentifier($node) : ?\PhpParser\Node

View File

@ -138,7 +138,7 @@ CODE_SAMPLE
return $classMethod->isStatic();
}
/**
* @return PropertyFetch|MethodCall
* @return MethodCall|PropertyFetch|null
*/
private function refactorFuncCallToMethodCall(\Rector\Transform\ValueObject\ArgumentFuncCallToMethodCall $argumentFuncCallToMethodCall, \PhpParser\Node\Stmt\Class_ $class, \PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node
{

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '363f4083d584d99f32a1d76961c0b2b8be4ced0e';
public const PACKAGE_VERSION = 'd0c25cc4b961d21a600cbdb425f73782e7607b0f';
/**
* @var string
*/
public const RELEASE_DATE = '2022-04-13 18:28:07';
public const RELEASE_DATE = '2022-04-13 18:34:56';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220413\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33::getLoader();
return ComposerAutoloaderInite47cda11e1042aecc1f62145a3abb83f::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33
class ComposerAutoloaderInite47cda11e1042aecc1f62145a3abb83f
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInite47cda11e1042aecc1f62145a3abb83f', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInite47cda11e1042aecc1f62145a3abb83f', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit599db1b317b53aaf4bc9b3077dc2be33::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInite47cda11e1042aecc1f62145a3abb83f::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit599db1b317b53aaf4bc9b3077dc2be33::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInite47cda11e1042aecc1f62145a3abb83f::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire599db1b317b53aaf4bc9b3077dc2be33($fileIdentifier, $file);
composerRequiree47cda11e1042aecc1f62145a3abb83f($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33
* @param string $file
* @return void
*/
function composerRequire599db1b317b53aaf4bc9b3077dc2be33($fileIdentifier, $file)
function composerRequiree47cda11e1042aecc1f62145a3abb83f($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit599db1b317b53aaf4bc9b3077dc2be33
class ComposerStaticInite47cda11e1042aecc1f62145a3abb83f
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@ -3863,9 +3863,9 @@ class ComposerStaticInit599db1b317b53aaf4bc9b3077dc2be33
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit599db1b317b53aaf4bc9b3077dc2be33::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit599db1b317b53aaf4bc9b3077dc2be33::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit599db1b317b53aaf4bc9b3077dc2be33::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInite47cda11e1042aecc1f62145a3abb83f::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInite47cda11e1042aecc1f62145a3abb83f::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInite47cda11e1042aecc1f62145a3abb83f::$classMap;
}, null, ClassLoader::class);
}

View File

@ -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('RectorPrefix20220413\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33', false) && !interface_exists('ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33', false) && !trait_exists('ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33', false)) {
spl_autoload_call('RectorPrefix20220413\ComposerAutoloaderInit599db1b317b53aaf4bc9b3077dc2be33');
if (!class_exists('ComposerAutoloaderInite47cda11e1042aecc1f62145a3abb83f', false) && !interface_exists('ComposerAutoloaderInite47cda11e1042aecc1f62145a3abb83f', false) && !trait_exists('ComposerAutoloaderInite47cda11e1042aecc1f62145a3abb83f', false)) {
spl_autoload_call('RectorPrefix20220413\ComposerAutoloaderInite47cda11e1042aecc1f62145a3abb83f');
}
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('RectorPrefix20220413\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220413\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire599db1b317b53aaf4bc9b3077dc2be33')) {
function composerRequire599db1b317b53aaf4bc9b3077dc2be33() {
return \RectorPrefix20220413\composerRequire599db1b317b53aaf4bc9b3077dc2be33(...func_get_args());
if (!function_exists('composerRequiree47cda11e1042aecc1f62145a3abb83f')) {
function composerRequiree47cda11e1042aecc1f62145a3abb83f() {
return \RectorPrefix20220413\composerRequiree47cda11e1042aecc1f62145a3abb83f(...func_get_args());
}
}
if (!function_exists('scanPath')) {