mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit 803fad69aeb8c9f417923e24d877c521e93df30a
803fad69ae
Enable PHPUnit data provider rule (#3106)
This commit is contained in:
parent
f0d81253f6
commit
00d4ffef47
@ -34,5 +34,35 @@ use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictGetterMethodRe
|
|||||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;
|
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;
|
||||||
use Rector\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector;
|
use Rector\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector;
|
||||||
return static function (RectorConfig $rectorConfig) : void {
|
return static function (RectorConfig $rectorConfig) : void {
|
||||||
$rectorConfig->rules([ParamTypeDeclarationRector::class, ReturnTypeDeclarationRector::class, PropertyTypeDeclarationRector::class, AddClosureReturnTypeRector::class, AddArrowFunctionReturnTypeRector::class, AddArrayParamDocTypeRector::class, AddArrayReturnDocTypeRector::class, ParamTypeByMethodCallTypeRector::class, TypedPropertyFromAssignsRector::class, ReturnAnnotationIncorrectNullableRector::class, VarAnnotationIncorrectNullableRector::class, ParamAnnotationIncorrectNullableRector::class, AddReturnTypeDeclarationBasedOnParentClassMethodRector::class, ReturnTypeFromStrictTypedPropertyRector::class, TypedPropertyFromStrictConstructorRector::class, ParamTypeFromStrictTypedPropertyRector::class, AddVoidReturnTypeWhereNoReturnRector::class, ReturnTypeFromReturnNewRector::class, TypedPropertyFromStrictGetterMethodReturnTypeRector::class, AddMethodCallBasedStrictParamTypeRector::class, ArrayShapeFromConstantArrayReturnRector::class, ReturnTypeFromStrictBoolReturnExprRector::class, ReturnTypeFromStrictNativeCallRector::class, ReturnTypeFromStrictNewArrayRector::class, ReturnTypeFromStrictScalarReturnExprRector::class, TypedPropertyFromStrictSetUpRector::class, ParamTypeByParentCallTypeRector::class]);
|
$rectorConfig->rules([
|
||||||
|
ParamTypeDeclarationRector::class,
|
||||||
|
ReturnTypeDeclarationRector::class,
|
||||||
|
PropertyTypeDeclarationRector::class,
|
||||||
|
AddClosureReturnTypeRector::class,
|
||||||
|
AddArrowFunctionReturnTypeRector::class,
|
||||||
|
AddArrayParamDocTypeRector::class,
|
||||||
|
AddArrayReturnDocTypeRector::class,
|
||||||
|
ParamTypeByMethodCallTypeRector::class,
|
||||||
|
TypedPropertyFromAssignsRector::class,
|
||||||
|
ReturnAnnotationIncorrectNullableRector::class,
|
||||||
|
VarAnnotationIncorrectNullableRector::class,
|
||||||
|
ParamAnnotationIncorrectNullableRector::class,
|
||||||
|
AddReturnTypeDeclarationBasedOnParentClassMethodRector::class,
|
||||||
|
ReturnTypeFromStrictTypedPropertyRector::class,
|
||||||
|
TypedPropertyFromStrictConstructorRector::class,
|
||||||
|
ParamTypeFromStrictTypedPropertyRector::class,
|
||||||
|
AddVoidReturnTypeWhereNoReturnRector::class,
|
||||||
|
ReturnTypeFromReturnNewRector::class,
|
||||||
|
TypedPropertyFromStrictGetterMethodReturnTypeRector::class,
|
||||||
|
AddMethodCallBasedStrictParamTypeRector::class,
|
||||||
|
ArrayShapeFromConstantArrayReturnRector::class,
|
||||||
|
ReturnTypeFromStrictBoolReturnExprRector::class,
|
||||||
|
ReturnTypeFromStrictNativeCallRector::class,
|
||||||
|
ReturnTypeFromStrictNewArrayRector::class,
|
||||||
|
ReturnTypeFromStrictScalarReturnExprRector::class,
|
||||||
|
TypedPropertyFromStrictSetUpRector::class,
|
||||||
|
ParamTypeByParentCallTypeRector::class,
|
||||||
|
// AddParamTypeSplFixedArrayRector::class,
|
||||||
|
AddParamTypeBasedOnPHPUnitDataProviderRector::class,
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
|
@ -122,6 +122,9 @@ CODE_SAMPLE
|
|||||||
}
|
}
|
||||||
$hasChanged = \false;
|
$hasChanged = \false;
|
||||||
foreach ($node->getParams() as $param) {
|
foreach ($node->getParams() as $param) {
|
||||||
|
if ($param->type instanceof Node) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$paramTypeDeclaration = $this->inferParam($param, $dataProviderPhpDocTagNode);
|
$paramTypeDeclaration = $this->inferParam($param, $dataProviderPhpDocTagNode);
|
||||||
if ($paramTypeDeclaration instanceof MixedType) {
|
if ($paramTypeDeclaration instanceof MixedType) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -17,12 +17,12 @@ final class VersionResolver
|
|||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = '10c76b3d85cc21a8834cd8952ff47a6bbcbf5915';
|
public const PACKAGE_VERSION = '803fad69aeb8c9f417923e24d877c521e93df30a';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2022-11-27 22:03:08';
|
public const RELEASE_DATE = '2022-11-27 21:19:17';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @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';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9::getLoader();
|
return ComposerAutoloaderInita94bb0a3381a2fdfb4fc230e2060ccf6::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
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9
|
class ComposerAutoloaderInita94bb0a3381a2fdfb4fc230e2060ccf6
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9
|
|||||||
return self::$loader;
|
return self::$loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInita94bb0a3381a2fdfb4fc230e2060ccf6', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInita94bb0a3381a2fdfb4fc230e2060ccf6', 'loadClassLoader'));
|
||||||
|
|
||||||
require __DIR__ . '/autoload_static.php';
|
require __DIR__ . '/autoload_static.php';
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::getInitializer($loader));
|
||||||
|
|
||||||
$loader->setClassMapAuthoritative(true);
|
$loader->setClassMapAuthoritative(true);
|
||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
$includeFiles = \Composer\Autoload\ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::$files;
|
$includeFiles = \Composer\Autoload\ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::$files;
|
||||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||||
composerRequire2e612febddb637cfcb0d9394c970d0b9($fileIdentifier, $file);
|
composerRequirea94bb0a3381a2fdfb4fc230e2060ccf6($fileIdentifier, $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9
|
|||||||
* @param string $file
|
* @param string $file
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function composerRequire2e612febddb637cfcb0d9394c970d0b9($fileIdentifier, $file)
|
function composerRequirea94bb0a3381a2fdfb4fc230e2060ccf6($fileIdentifier, $file)
|
||||||
{
|
{
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
$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;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9
|
class ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||||
@ -3037,9 +3037,9 @@ class ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9
|
|||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::$classMap;
|
$loader->classMap = ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user