mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-30 07:50:53 +00:00
Updated Rector to commit 3820e0075152c72f618226ff213faf847e3d39f7
3820e00751
[CodeQuality] Skip static::class on InlineConstructorDefaultToPropertyRector (#2899)
This commit is contained in:
parent
8187757e86
commit
2f2c1d1b5f
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 ComposerAutoloaderInite7947ecf62e88fdbb798321c39672edc::getLoader();
|
||||
return ComposerAutoloaderInit5fb610957f9d0d33e4142b638f34727c::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 ComposerAutoloaderInite7947ecf62e88fdbb798321c39672edc
|
||||
class ComposerAutoloaderInit5fb610957f9d0d33e4142b638f34727c
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInite7947ecf62e88fdbb798321c39672edc
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInite7947ecf62e88fdbb798321c39672edc', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit5fb610957f9d0d33e4142b638f34727c', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite7947ecf62e88fdbb798321c39672edc', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit5fb610957f9d0d33e4142b638f34727c', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite7947ecf62e88fdbb798321c39672edc::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit5fb610957f9d0d33e4142b638f34727c::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInite7947ecf62e88fdbb798321c39672edc::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit5fb610957f9d0d33e4142b638f34727c::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequiree7947ecf62e88fdbb798321c39672edc($fileIdentifier, $file);
|
||||
composerRequire5fb610957f9d0d33e4142b638f34727c($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInite7947ecf62e88fdbb798321c39672edc
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequiree7947ecf62e88fdbb798321c39672edc($fileIdentifier, $file)
|
||||
function composerRequire5fb610957f9d0d33e4142b638f34727c($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 ComposerStaticInite7947ecf62e88fdbb798321c39672edc
|
||||
class ComposerStaticInit5fb610957f9d0d33e4142b638f34727c
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3095,9 +3095,9 @@ class ComposerStaticInite7947ecf62e88fdbb798321c39672edc
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite7947ecf62e88fdbb798321c39672edc::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite7947ecf62e88fdbb798321c39672edc::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite7947ecf62e88fdbb798321c39672edc::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit5fb610957f9d0d33e4142b638f34727c::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit5fb610957f9d0d33e4142b638f34727c::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit5fb610957f9d0d33e4142b638f34727c::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
|
@ -2128,12 +2128,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
|
||||
"reference": "876839e5be91b3b26a7be1f49248039a998dfd23"
|
||||
"reference": "3f58e442e134af44aa45316fb7e6033b9ea4e306"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/876839e5be91b3b26a7be1f49248039a998dfd23",
|
||||
"reference": "876839e5be91b3b26a7be1f49248039a998dfd23",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/3f58e442e134af44aa45316fb7e6033b9ea4e306",
|
||||
"reference": "3f58e442e134af44aa45316fb7e6033b9ea4e306",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2159,7 +2159,7 @@
|
|||
"symplify\/rule-doc-generator": "^11.1",
|
||||
"symplify\/vendor-patches": "^11.1"
|
||||
},
|
||||
"time": "2022-09-02T10:58:16+00:00",
|
||||
"time": "2022-09-03T06:17:05+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 a489bf0'), '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 bdf6e7c'), '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 b4b49bf'), '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 2decdcf'), '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 294de0c'), '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 876839e'), '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 8c0ac2e'));
|
||||
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 a489bf0'), '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 bdf6e7c'), '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 b4b49bf'), '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 2decdcf'), '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 294de0c'), '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 3f58e44'), '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 8c0ac2e'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -8,8 +8,10 @@ use PhpParser\Node\Expr\PropertyFetch;
|
|||
use PhpParser\Node\Expr\StaticCall;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PHPStan\Type\IntersectionType;
|
||||
use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\Type;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeTypeResolver\NodeTypeResolver;
|
||||
use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser;
|
||||
|
@ -51,6 +53,9 @@ final class MockedVariableAnalyzer
|
|||
if ($variableType instanceof MixedType) {
|
||||
return null;
|
||||
}
|
||||
if ($this->isIntersectionTypeWithMockObject($variableType)) {
|
||||
$doesContainMock = \true;
|
||||
}
|
||||
if ($variableType->isSuperTypeOf(new ObjectType('PHPUnit\\Framework\\MockObject\\MockObject'))->yes()) {
|
||||
$doesContainMock = \true;
|
||||
}
|
||||
|
@ -58,6 +63,17 @@ final class MockedVariableAnalyzer
|
|||
});
|
||||
return $doesContainMock;
|
||||
}
|
||||
private function isIntersectionTypeWithMockObject(Type $variableType) : bool
|
||||
{
|
||||
if ($variableType instanceof IntersectionType) {
|
||||
foreach ($variableType->getTypes() as $variableTypeType) {
|
||||
if ($variableTypeType->isSuperTypeOf(new ObjectType('PHPUnit\\Framework\\MockObject\\MockObject'))->yes()) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
private function isMockeryStaticCall(Node $node) : bool
|
||||
{
|
||||
if (!$node instanceof StaticCall) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user