mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 14:27:14 +01:00
Updated Rector to commit 505843774379b875c64ed612f2bdc5bae2d769f6
5058437743
[DeadCode] Skip RecastingRemovalRector on has __set() and __get() (#790)
This commit is contained in:
parent
d5dde5695b
commit
e934dd7526
@ -24,6 +24,7 @@ use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\StringType;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\UnionType;
|
||||
use Rector\Core\NodeAnalyzer\PropertyFetchAnalyzer;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\Reflection\ReflectionResolver;
|
||||
@ -106,7 +107,11 @@ CODE_SAMPLE
|
||||
/** @var PropertyFetch|StaticPropertyFetch $expr */
|
||||
$phpPropertyReflection = $this->reflectionResolver->resolvePropertyReflectionFromPropertyFetch($expr);
|
||||
if (!$phpPropertyReflection instanceof \PHPStan\Reflection\Php\PhpPropertyReflection) {
|
||||
return \false;
|
||||
$propertyType = $expr instanceof \PhpParser\Node\Expr\StaticPropertyFetch ? $this->nodeTypeResolver->resolve($expr->class) : $this->nodeTypeResolver->resolve($expr->var);
|
||||
// need to UnionType check due rectify with RecastingRemovalRector + CountOnNullRector
|
||||
// cause add (array) cast on $node->args
|
||||
// on union $node types FuncCall|MethodCall|StaticCall
|
||||
return !$propertyType instanceof \PHPStan\Type\UnionType;
|
||||
}
|
||||
$nativeType = $phpPropertyReflection->getNativeType();
|
||||
return $nativeType instanceof \PHPStan\Type\MixedType;
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'f257b10df15331bc6bf3cfa9fc2c44b685a0076b';
|
||||
public const PACKAGE_VERSION = '505843774379b875c64ed612f2bdc5bae2d769f6';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-08-30 10:16:55';
|
||||
public const RELEASE_DATE = '2021-08-30 10:17:27';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210830\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInite2f04476e58288750fa77432dff28e79::getLoader();
|
||||
return ComposerAutoloaderInit5c11e232192e0b55956950eb7869d1c8::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 ComposerAutoloaderInite2f04476e58288750fa77432dff28e79
|
||||
class ComposerAutoloaderInit5c11e232192e0b55956950eb7869d1c8
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInite2f04476e58288750fa77432dff28e79
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInite2f04476e58288750fa77432dff28e79', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit5c11e232192e0b55956950eb7869d1c8', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite2f04476e58288750fa77432dff28e79', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit5c11e232192e0b55956950eb7869d1c8', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite2f04476e58288750fa77432dff28e79::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit5c11e232192e0b55956950eb7869d1c8::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInite2f04476e58288750fa77432dff28e79
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInite2f04476e58288750fa77432dff28e79::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit5c11e232192e0b55956950eb7869d1c8::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequiree2f04476e58288750fa77432dff28e79($fileIdentifier, $file);
|
||||
composerRequire5c11e232192e0b55956950eb7869d1c8($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequiree2f04476e58288750fa77432dff28e79($fileIdentifier, $file)
|
||||
function composerRequire5c11e232192e0b55956950eb7869d1c8($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInite2f04476e58288750fa77432dff28e79
|
||||
class ComposerStaticInit5c11e232192e0b55956950eb7869d1c8
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
@ -3856,9 +3856,9 @@ class ComposerStaticInite2f04476e58288750fa77432dff28e79
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite2f04476e58288750fa77432dff28e79::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite2f04476e58288750fa77432dff28e79::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite2f04476e58288750fa77432dff28e79::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit5c11e232192e0b55956950eb7869d1c8::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit5c11e232192e0b55956950eb7869d1c8::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit5c11e232192e0b55956950eb7869d1c8::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -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('RectorPrefix20210830\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInite2f04476e58288750fa77432dff28e79', false) && !interface_exists('ComposerAutoloaderInite2f04476e58288750fa77432dff28e79', false) && !trait_exists('ComposerAutoloaderInite2f04476e58288750fa77432dff28e79', false)) {
|
||||
spl_autoload_call('RectorPrefix20210830\ComposerAutoloaderInite2f04476e58288750fa77432dff28e79');
|
||||
if (!class_exists('ComposerAutoloaderInit5c11e232192e0b55956950eb7869d1c8', false) && !interface_exists('ComposerAutoloaderInit5c11e232192e0b55956950eb7869d1c8', false) && !trait_exists('ComposerAutoloaderInit5c11e232192e0b55956950eb7869d1c8', false)) {
|
||||
spl_autoload_call('RectorPrefix20210830\ComposerAutoloaderInit5c11e232192e0b55956950eb7869d1c8');
|
||||
}
|
||||
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('RectorPrefix20210830\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
@ -3311,9 +3311,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20210830\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequiree2f04476e58288750fa77432dff28e79')) {
|
||||
function composerRequiree2f04476e58288750fa77432dff28e79() {
|
||||
return \RectorPrefix20210830\composerRequiree2f04476e58288750fa77432dff28e79(...func_get_args());
|
||||
if (!function_exists('composerRequire5c11e232192e0b55956950eb7869d1c8')) {
|
||||
function composerRequire5c11e232192e0b55956950eb7869d1c8() {
|
||||
return \RectorPrefix20210830\composerRequire5c11e232192e0b55956950eb7869d1c8(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user