mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-02 01:10:53 +00:00
Updated Rector to commit f936077f5fd5428f97d49e58f1e2a22db2c78978
f936077f5f
Fix performance issue (#2774)
This commit is contained in:
parent
5b360ddf1d
commit
e82274c2bf
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 ComposerAutoloaderInit2399bae920a0c53832626edd0865e019::getLoader();
|
||||
return ComposerAutoloaderInit8f48ed657e6421f1bf41eb87bb075353::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 ComposerAutoloaderInit2399bae920a0c53832626edd0865e019
|
||||
class ComposerAutoloaderInit8f48ed657e6421f1bf41eb87bb075353
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInit2399bae920a0c53832626edd0865e019
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2399bae920a0c53832626edd0865e019', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit8f48ed657e6421f1bf41eb87bb075353', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2399bae920a0c53832626edd0865e019', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit8f48ed657e6421f1bf41eb87bb075353', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2399bae920a0c53832626edd0865e019::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit8f48ed657e6421f1bf41eb87bb075353::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit2399bae920a0c53832626edd0865e019::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit8f48ed657e6421f1bf41eb87bb075353::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire2399bae920a0c53832626edd0865e019($fileIdentifier, $file);
|
||||
composerRequire8f48ed657e6421f1bf41eb87bb075353($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInit2399bae920a0c53832626edd0865e019
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire2399bae920a0c53832626edd0865e019($fileIdentifier, $file)
|
||||
function composerRequire8f48ed657e6421f1bf41eb87bb075353($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 ComposerStaticInit2399bae920a0c53832626edd0865e019
|
||||
class ComposerStaticInit8f48ed657e6421f1bf41eb87bb075353
|
||||
{
|
||||
public static $files = array (
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
|
@ -3250,9 +3250,9 @@ class ComposerStaticInit2399bae920a0c53832626edd0865e019
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2399bae920a0c53832626edd0865e019::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2399bae920a0c53832626edd0865e019::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2399bae920a0c53832626edd0865e019::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit8f48ed657e6421f1bf41eb87bb075353::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit8f48ed657e6421f1bf41eb87bb075353::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit8f48ed657e6421f1bf41eb87bb075353::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
|
@ -2267,12 +2267,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
|
||||
"reference": "d72eecf1510871773a0564b2aff00119b401d8cc"
|
||||
"reference": "eb71f66e7e5cf631a023a139589a270ea824d121"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/d72eecf1510871773a0564b2aff00119b401d8cc",
|
||||
"reference": "d72eecf1510871773a0564b2aff00119b401d8cc",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/eb71f66e7e5cf631a023a139589a270ea824d121",
|
||||
"reference": "eb71f66e7e5cf631a023a139589a270ea824d121",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2301,7 +2301,7 @@
|
|||
"symplify\/rule-doc-generator": "^11.0",
|
||||
"symplify\/vendor-patches": "^11.0"
|
||||
},
|
||||
"time": "2022-08-17T13:32:59+00:00",
|
||||
"time": "2022-08-18T11:52:01+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c2ec06c'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 49ba991'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main efc7ddf'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 38440b9'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 20edb95'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 3638a66'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 528d313'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main d72eecf'));
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c2ec06c'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 49ba991'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main efc7ddf'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 38440b9'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 20edb95'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 3638a66'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 528d313'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main eb71f66'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace Rector\Symfony\Rector\MethodCall;
|
|||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer;
|
||||
use Rector\Symfony\NodeAnalyzer\SymfonyTestCaseAnalyzer;
|
||||
|
@ -115,6 +116,10 @@ CODE_SAMPLE
|
|||
return null;
|
||||
}
|
||||
$nestedMethodCall = $secondArg->value;
|
||||
// caller must be a response object
|
||||
if (!$this->isObjectType($nestedMethodCall->var, new ObjectType('Symfony\\Component\\HttpFoundation\\Response'))) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->nodeNameResolver->isName($nestedMethodCall->name, 'getStatusCode')) {
|
||||
return null;
|
||||
}
|
||||
|
@ -122,7 +127,7 @@ CODE_SAMPLE
|
|||
if ($statusCode === null) {
|
||||
return null;
|
||||
}
|
||||
// handled by another methods
|
||||
// handled by another method
|
||||
if ($statusCode === 200) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user