Skip to content

Commit

Permalink
Updated Rector to commit 803fad69aeb8c9f417923e24d877c521e93df30a
Browse files Browse the repository at this point in the history
rectorphp/rector-src@803fad6 Enable PHPUnit data provider rule (#3106)
  • Loading branch information
TomasVotruba committed Nov 27, 2022
1 parent f0d8125 commit 00d4ffe
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 15 deletions.
32 changes: 31 additions & 1 deletion config/set/type-declaration.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,35 @@
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;
use Rector\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector;
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,
]);
};
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ public function refactor(Node $node) : ?ClassMethod
}
$hasChanged = \false;
foreach ($node->getParams() as $param) {
if ($param->type instanceof Node) {
continue;
}
$paramTypeDeclaration = $this->inferParam($param, $dataProviderPhpDocTagNode);
if ($paramTypeDeclaration instanceof MixedType) {
continue;
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '10c76b3d85cc21a8834cd8952ff47a6bbcbf5915';
public const PACKAGE_VERSION = '803fad69aeb8c9f417923e24d877c521e93df30a';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2022-11-27 22:03:08';
public const RELEASE_DATE = '2022-11-27 21:19:17';
/**
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9::getLoader();
return ComposerAutoloaderInita94bb0a3381a2fdfb4fc230e2060ccf6::getLoader();
14 changes: 7 additions & 7 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9
class ComposerAutoloaderInita94bb0a3381a2fdfb4fc230e2060ccf6
{
private static $loader;

Expand All @@ -22,19 +22,19 @@ public static function getLoader()
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__));
spl_autoload_unregister(array('ComposerAutoloaderInit2e612febddb637cfcb0d9394c970d0b9', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInita94bb0a3381a2fdfb4fc230e2060ccf6', 'loadClassLoader'));

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->register(true);

$includeFiles = \Composer\Autoload\ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire2e612febddb637cfcb0d9394c970d0b9($fileIdentifier, $file);
composerRequirea94bb0a3381a2fdfb4fc230e2060ccf6($fileIdentifier, $file);
}

return $loader;
Expand All @@ -46,7 +46,7 @@ public static function getLoader()
* @param string $file
* @return void
*/
function composerRequire2e612febddb637cfcb0d9394c970d0b9($fileIdentifier, $file)
function composerRequirea94bb0a3381a2fdfb4fc230e2060ccf6($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9
class ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3037,9 +3037,9 @@ class ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit2e612febddb637cfcb0d9394c970d0b9::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInita94bb0a3381a2fdfb4fc230e2060ccf6::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit 00d4ffe

Please sign in to comment.