mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-29 11:33:33 +01:00
Updated Rector to commit 8c07d677b46caf2ea84c174669d2b416e577fc67
8c07d677b4
AddReturnTypeDeclarationBasedOnParentClassMethodRector fix mixed return type by parent interface (#2755)
This commit is contained in:
parent
f6f9dadfe8
commit
5ff40fa637
@ -6,6 +6,7 @@ namespace Rector\TypeDeclaration\Rector\ClassMethod;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Interface_;
|
||||
use PHPStan\Reflection\MethodReflection;
|
||||
use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\ObjectType;
|
||||
@ -121,7 +122,7 @@ CODE_SAMPLE
|
||||
{
|
||||
if ($parentType instanceof MixedType) {
|
||||
$parentNode = $classMethod->getAttribute(AttributeKey::PARENT_NODE);
|
||||
if (!$parentNode instanceof Class_) {
|
||||
if (!$parentNode instanceof Class_ && !$parentNode instanceof Interface_) {
|
||||
return null;
|
||||
}
|
||||
$className = (string) $this->nodeNameResolver->getName($parentNode);
|
||||
|
@ -17,12 +17,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '2667f35cc72a6f7da454635a24bdc3ede61082ae';
|
||||
public const PACKAGE_VERSION = '8c07d677b46caf2ea84c174669d2b416e577fc67';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-08-11 16:58:37';
|
||||
public const RELEASE_DATE = '2022-08-11 17:35:47';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit18d3aa3277e59cddf7025994207a8101::getLoader();
|
||||
return ComposerAutoloaderInit24f0926d3a42be2a7359bf4fba1244cc::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 ComposerAutoloaderInit18d3aa3277e59cddf7025994207a8101
|
||||
class ComposerAutoloaderInit24f0926d3a42be2a7359bf4fba1244cc
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInit18d3aa3277e59cddf7025994207a8101
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit18d3aa3277e59cddf7025994207a8101', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit24f0926d3a42be2a7359bf4fba1244cc', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit18d3aa3277e59cddf7025994207a8101', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit24f0926d3a42be2a7359bf4fba1244cc', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit18d3aa3277e59cddf7025994207a8101::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit24f0926d3a42be2a7359bf4fba1244cc::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit18d3aa3277e59cddf7025994207a8101::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit24f0926d3a42be2a7359bf4fba1244cc::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire18d3aa3277e59cddf7025994207a8101($fileIdentifier, $file);
|
||||
composerRequire24f0926d3a42be2a7359bf4fba1244cc($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInit18d3aa3277e59cddf7025994207a8101
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire18d3aa3277e59cddf7025994207a8101($fileIdentifier, $file)
|
||||
function composerRequire24f0926d3a42be2a7359bf4fba1244cc($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$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;
|
||||
|
||||
class ComposerStaticInit18d3aa3277e59cddf7025994207a8101
|
||||
class ComposerStaticInit24f0926d3a42be2a7359bf4fba1244cc
|
||||
{
|
||||
public static $files = array (
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
@ -3250,9 +3250,9 @@ class ComposerStaticInit18d3aa3277e59cddf7025994207a8101
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit18d3aa3277e59cddf7025994207a8101::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit18d3aa3277e59cddf7025994207a8101::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit18d3aa3277e59cddf7025994207a8101::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit24f0926d3a42be2a7359bf4fba1244cc::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit24f0926d3a42be2a7359bf4fba1244cc::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit24f0926d3a42be2a7359bf4fba1244cc::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user