Updated Rector to commit af4cf28751f652d2ee1a8319d6cb39bf8614a1c1

af4cf28751 [DX] Use directly instanceof (#3021)
This commit is contained in:
Tomas Votruba 2022-10-28 10:16:48 +00:00
parent 34ee94e559
commit 0f38f3753c
6 changed files with 18 additions and 16 deletions

View File

@ -4,6 +4,7 @@ declare (strict_types=1);
namespace Rector\CodeQuality\Rector\If_;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\If_;
use PhpParser\Node\Stmt\Return_;
@ -55,7 +56,7 @@ CODE_SAMPLE
public function refactor(Node $node) : ?Stmt
{
$expr = $this->ifManipulator->matchIfNotNullReturnValue($node);
if ($expr !== null) {
if ($expr instanceof Expr) {
$insideIfNode = $node->stmts[0];
$nextNode = $node->getAttribute(AttributeKey::NEXT_NODE);
if (!$nextNode instanceof Return_) {

View File

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Transform\NodeAnalyzer;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\Variable;
@ -64,7 +65,7 @@ final class FuncCallStaticCallToMethodCallAnalyzer
public function matchTypeProvidingExpr(Class_ $class, ClassMethod $classMethod, ObjectType $objectType)
{
$expr = $this->typeProvidingExprFromClassResolver->resolveTypeProvidingExprFromClass($class, $classMethod, $objectType);
if ($expr !== null) {
if ($expr instanceof Expr) {
if ($expr instanceof Variable) {
$this->addClassMethodParamForVariable($expr, $objectType, $classMethod);
}

View File

@ -17,12 +17,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '81d79a85ee8b75e8e61800aefffb3286e870109b';
public const PACKAGE_VERSION = 'af4cf28751f652d2ee1a8319d6cb39bf8614a1c1';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2022-10-28 10:55:56';
public const RELEASE_DATE = '2022-10-28 10:12:28';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a::getLoader();
return ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a
class ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire98ae6f54e9a394b892c328c6cc59d05a($fileIdentifier, $file);
composerRequire3e77fd98660aed01aa501e8309ba9490($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a
* @param string $file
* @return void
*/
function composerRequire98ae6f54e9a394b892c328c6cc59d05a($fileIdentifier, $file)
function composerRequire3e77fd98660aed01aa501e8309ba9490($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a
class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3047,9 +3047,9 @@ class ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$classMap;
}, null, ClassLoader::class);
}