Skip to content

Commit 0f38f37

Browse files
committed
Updated Rector to commit af4cf28751f652d2ee1a8319d6cb39bf8614a1c1
rectorphp/rector-src@af4cf28 [DX] Use directly instanceof (#3021)
1 parent 34ee94e commit 0f38f37

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

rules/CodeQuality/Rector/If_/SimplifyIfNotNullReturnRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
namespace Rector\CodeQuality\Rector\If_;
55

66
use PhpParser\Node;
7+
use PhpParser\Node\Expr;
78
use PhpParser\Node\Stmt;
89
use PhpParser\Node\Stmt\If_;
910
use PhpParser\Node\Stmt\Return_;
@@ -55,7 +56,7 @@ public function getNodeTypes() : array
5556
public function refactor(Node $node) : ?Stmt
5657
{
5758
$expr = $this->ifManipulator->matchIfNotNullReturnValue($node);
58-
if ($expr !== null) {
59+
if ($expr instanceof Expr) {
5960
$insideIfNode = $node->stmts[0];
6061
$nextNode = $node->getAttribute(AttributeKey::NEXT_NODE);
6162
if (!$nextNode instanceof Return_) {

rules/Transform/NodeAnalyzer/FuncCallStaticCallToMethodCallAnalyzer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare (strict_types=1);
44
namespace Rector\Transform\NodeAnalyzer;
55

6+
use PhpParser\Node\Expr;
67
use PhpParser\Node\Expr\MethodCall;
78
use PhpParser\Node\Expr\PropertyFetch;
89
use PhpParser\Node\Expr\Variable;
@@ -64,7 +65,7 @@ public function __construct(TypeProvidingExprFromClassResolver $typeProvidingExp
6465
public function matchTypeProvidingExpr(Class_ $class, ClassMethod $classMethod, ObjectType $objectType)
6566
{
6667
$expr = $this->typeProvidingExprFromClassResolver->resolveTypeProvidingExprFromClass($class, $classMethod, $objectType);
67-
if ($expr !== null) {
68+
if ($expr instanceof Expr) {
6869
if ($expr instanceof Variable) {
6970
$this->addClassMethodParamForVariable($expr, $objectType, $classMethod);
7071
}

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ final class VersionResolver
1717
* @api
1818
* @var string
1919
*/
20-
public const PACKAGE_VERSION = '81d79a85ee8b75e8e61800aefffb3286e870109b';
20+
public const PACKAGE_VERSION = 'af4cf28751f652d2ee1a8319d6cb39bf8614a1c1';
2121
/**
2222
* @api
2323
* @var string
2424
*/
25-
public const RELEASE_DATE = '2022-10-28 10:55:56';
25+
public const RELEASE_DATE = '2022-10-28 10:12:28';
2626
/**
2727
* @var int
2828
*/

vendor/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222

2323
require_once __DIR__ . '/composer/autoload_real.php';
2424

25-
return ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a::getLoader();
25+
return ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490::getLoader();

vendor/composer/autoload_real.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// autoload_real.php @generated by Composer
44

5-
class ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a
5+
class ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490
66
{
77
private static $loader;
88

@@ -22,19 +22,19 @@ public static function getLoader()
2222
return self::$loader;
2323
}
2424

25-
spl_autoload_register(array('ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a', 'loadClassLoader'), true, true);
25+
spl_autoload_register(array('ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490', 'loadClassLoader'), true, true);
2626
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27-
spl_autoload_unregister(array('ComposerAutoloaderInit98ae6f54e9a394b892c328c6cc59d05a', 'loadClassLoader'));
27+
spl_autoload_unregister(array('ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490', 'loadClassLoader'));
2828

2929
require __DIR__ . '/autoload_static.php';
30-
call_user_func(\Composer\Autoload\ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::getInitializer($loader));
30+
call_user_func(\Composer\Autoload\ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::getInitializer($loader));
3131

3232
$loader->setClassMapAuthoritative(true);
3333
$loader->register(true);
3434

35-
$includeFiles = \Composer\Autoload\ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::$files;
35+
$includeFiles = \Composer\Autoload\ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$files;
3636
foreach ($includeFiles as $fileIdentifier => $file) {
37-
composerRequire98ae6f54e9a394b892c328c6cc59d05a($fileIdentifier, $file);
37+
composerRequire3e77fd98660aed01aa501e8309ba9490($fileIdentifier, $file);
3838
}
3939

4040
return $loader;
@@ -46,7 +46,7 @@ public static function getLoader()
4646
* @param string $file
4747
* @return void
4848
*/
49-
function composerRequire98ae6f54e9a394b892c328c6cc59d05a($fileIdentifier, $file)
49+
function composerRequire3e77fd98660aed01aa501e8309ba9490($fileIdentifier, $file)
5050
{
5151
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
5252
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

vendor/composer/autoload_static.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Composer\Autoload;
66

7-
class ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a
7+
class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490
88
{
99
public static $files = array (
1010
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@@ -3047,9 +3047,9 @@ class ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a
30473047
public static function getInitializer(ClassLoader $loader)
30483048
{
30493049
return \Closure::bind(function () use ($loader) {
3050-
$loader->prefixLengthsPsr4 = ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::$prefixLengthsPsr4;
3051-
$loader->prefixDirsPsr4 = ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::$prefixDirsPsr4;
3052-
$loader->classMap = ComposerStaticInit98ae6f54e9a394b892c328c6cc59d05a::$classMap;
3050+
$loader->prefixLengthsPsr4 = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$prefixLengthsPsr4;
3051+
$loader->prefixDirsPsr4 = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$prefixDirsPsr4;
3052+
$loader->classMap = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$classMap;
30533053

30543054
}, null, ClassLoader::class);
30553055
}

0 commit comments

Comments
 (0)