Updated Rector to commit 69c4ca8aaffd3340d8c9011b52f16189d15778f7

69c4ca8aaf [TypeDeclaration] Skip crash Undefined property: PhpParser\Node\Stmt\Enum_:: on AddParamTypeDeclarationRector (#3272)
This commit is contained in:
Tomas Votruba 2023-01-10 14:56:25 +00:00
parent 96c131c440
commit 2662858a47
5 changed files with 13 additions and 18 deletions

View File

@ -9,7 +9,6 @@ use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassLike;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Interface_;
use PhpParser\Node\Stmt\Trait_;
use PHPStan\Type\MixedType;
use PHPStan\Type\StringType;
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
@ -115,14 +114,10 @@ CODE_SAMPLE
if ($classMethod->params === []) {
return \true;
}
$classLike = $this->betterNodeFinder->findParentType($classMethod, ClassLike::class);
$classLike = $this->betterNodeFinder->findParentByTypes($classMethod, [Class_::class, Interface_::class]);
if (!$classLike instanceof ClassLike) {
return \true;
}
// skip traits
if ($classLike instanceof Trait_) {
return \true;
}
// skip class without parents/interfaces
if ($classLike instanceof Class_) {
if ($classLike->implements !== []) {

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'c406c850e227b673b256fef4c9d1a368982f2a2e';
public const PACKAGE_VERSION = '69c4ca8aaffd3340d8c9011b52f16189d15778f7';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-01-10 12:11:57';
public const RELEASE_DATE = '2023-01-10 15:50:21';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitce48d1a146ec11dc4b60648faa2b66cf
class ComposerAutoloaderInit5d07e221a6769defc913497899811691
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInitce48d1a146ec11dc4b60648faa2b66cf
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitce48d1a146ec11dc4b60648faa2b66cf', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit5d07e221a6769defc913497899811691', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitce48d1a146ec11dc4b60648faa2b66cf', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit5d07e221a6769defc913497899811691', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitce48d1a146ec11dc4b60648faa2b66cf::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit5d07e221a6769defc913497899811691::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitce48d1a146ec11dc4b60648faa2b66cf::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit5d07e221a6769defc913497899811691::$files;
$requireFile = static function ($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 ComposerStaticInitce48d1a146ec11dc4b60648faa2b66cf
class ComposerStaticInit5d07e221a6769defc913497899811691
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3064,9 +3064,9 @@ class ComposerStaticInitce48d1a146ec11dc4b60648faa2b66cf
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitce48d1a146ec11dc4b60648faa2b66cf::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitce48d1a146ec11dc4b60648faa2b66cf::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitce48d1a146ec11dc4b60648faa2b66cf::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit5d07e221a6769defc913497899811691::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit5d07e221a6769defc913497899811691::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit5d07e221a6769defc913497899811691::$classMap;
}, null, ClassLoader::class);
}