mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-31 20:51:46 +01:00
Updated Rector to commit fae3f77647f40495b6a9e53bbb004a6711e73863
fae3f77647
warn only about deprecated constants
This commit is contained in:
parent
058d52567d
commit
7b85159b91
@ -5,12 +5,9 @@ namespace Rector\TypeDeclaration\TypeInferer;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\ArrowFunction;
|
||||
use PhpParser\Node\Expr\Closure;
|
||||
use PhpParser\Node\FunctionLike;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use PhpParser\Node\Stmt\Return_;
|
||||
use PhpParser\Node\UnionType as PhpParserUnionType;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
@ -132,9 +129,8 @@ final class ReturnTypeInferer
|
||||
}
|
||||
private function resolveTypeWithVoidHandling(\PhpParser\Node\FunctionLike $functionLike, \PHPStan\Type\Type $resolvedType) : \PHPStan\Type\Type
|
||||
{
|
||||
if ($resolvedType instanceof \PHPStan\Type\VoidType && !$functionLike instanceof \PhpParser\Node\Expr\ArrowFunction) {
|
||||
/** @var ClassMethod|Function_|Closure $functionLike */
|
||||
$hasReturnValue = (bool) $this->betterNodeFinder->findFirstInFunctionLikeScoped($functionLike, function (\PhpParser\Node $subNode) : bool {
|
||||
if ($resolvedType instanceof \PHPStan\Type\VoidType) {
|
||||
$hasReturnValue = (bool) $this->betterNodeFinder->findFirst((array) $functionLike->getStmts(), function (\PhpParser\Node $subNode) : bool {
|
||||
if (!$subNode instanceof \PhpParser\Node\Stmt\Return_) {
|
||||
return \false;
|
||||
}
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'c621d7650d8ab4c9f051aff92ae20701436cd0fc';
|
||||
public const PACKAGE_VERSION = 'fae3f77647f40495b6a9e53bbb004a6711e73863';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-12-10 10:44:51';
|
||||
public const RELEASE_DATE = '2021-12-10 10:44:42';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20211210\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 ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198::getLoader();
|
||||
return ComposerAutoloaderInit2104a8a4ddf908805479f8b5763b58a5::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 ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198
|
||||
class ComposerAutoloaderInit2104a8a4ddf908805479f8b5763b58a5
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2104a8a4ddf908805479f8b5763b58a5', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2104a8a4ddf908805479f8b5763b58a5', '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\ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2104a8a4ddf908805479f8b5763b58a5::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit2104a8a4ddf908805479f8b5763b58a5::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire3bc916bb193a710b4ba05e39509fa198($fileIdentifier, $file);
|
||||
composerRequire2104a8a4ddf908805479f8b5763b58a5($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequire3bc916bb193a710b4ba05e39509fa198($fileIdentifier, $file)
|
||||
function composerRequire2104a8a4ddf908805479f8b5763b58a5($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 ComposerStaticInit3bc916bb193a710b4ba05e39509fa198
|
||||
class ComposerStaticInit2104a8a4ddf908805479f8b5763b58a5
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
@ -3795,9 +3795,9 @@ class ComposerStaticInit3bc916bb193a710b4ba05e39509fa198
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2104a8a4ddf908805479f8b5763b58a5::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2104a8a4ddf908805479f8b5763b58a5::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2104a8a4ddf908805479f8b5763b58a5::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -12,8 +12,8 @@ if (!class_exists('GenerateChangelogCommand', false) && !interface_exists('Gener
|
||||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20211210\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', false) && !interface_exists('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', false) && !trait_exists('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', false)) {
|
||||
spl_autoload_call('RectorPrefix20211210\ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198');
|
||||
if (!class_exists('ComposerAutoloaderInit2104a8a4ddf908805479f8b5763b58a5', false) && !interface_exists('ComposerAutoloaderInit2104a8a4ddf908805479f8b5763b58a5', false) && !trait_exists('ComposerAutoloaderInit2104a8a4ddf908805479f8b5763b58a5', false)) {
|
||||
spl_autoload_call('RectorPrefix20211210\ComposerAutoloaderInit2104a8a4ddf908805479f8b5763b58a5');
|
||||
}
|
||||
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('RectorPrefix20211210\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
@ -81,9 +81,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20211210\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire3bc916bb193a710b4ba05e39509fa198')) {
|
||||
function composerRequire3bc916bb193a710b4ba05e39509fa198() {
|
||||
return \RectorPrefix20211210\composerRequire3bc916bb193a710b4ba05e39509fa198(...func_get_args());
|
||||
if (!function_exists('composerRequire2104a8a4ddf908805479f8b5763b58a5')) {
|
||||
function composerRequire2104a8a4ddf908805479f8b5763b58a5() {
|
||||
return \RectorPrefix20211210\composerRequire2104a8a4ddf908805479f8b5763b58a5(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user