Skip to content

Commit

Permalink
Updated Rector to commit b2e90e8df6609979f068858c5912aba7e2d1ede3
Browse files Browse the repository at this point in the history
rectorphp/rector-src@b2e90e8 [DeadCode] Skip assign inside if cond on RemoveAlwaysTrueIfConditionRector (#3447)
  • Loading branch information
TomasVotruba committed Mar 4, 2023
1 parent 9d9213d commit bc4d628
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Expr\Variable;
Expand Down Expand Up @@ -98,6 +99,10 @@ public function refactor(Node $node)
if ($this->shouldSkipFromParam($node->cond)) {
return null;
}
$hasAssign = (bool) $this->betterNodeFinder->findFirstInstanceOf($node->cond, Assign::class);
if ($hasAssign) {
return null;
}
if ($node->stmts === []) {
$this->removeNode($node);
return null;
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '658e48f31fcb26a0e56740a49a994dbab3c1e6b5';
public const PACKAGE_VERSION = 'b2e90e8df6609979f068858c5912aba7e2d1ede3';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-03-03 10:01:40';
public const RELEASE_DATE = '2023-03-04 08:47:14';
/**
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

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

return ComposerAutoloaderInitae061628df81b43cbeda68c381086662::getLoader();
return ComposerAutoloaderInitf8c0438427ea358f45c5d867586b1c86::getLoader();
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitae061628df81b43cbeda68c381086662
class ComposerAutoloaderInitf8c0438427ea358f45c5d867586b1c86
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInitae061628df81b43cbeda68c381086662', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitf8c0438427ea358f45c5d867586b1c86', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitae061628df81b43cbeda68c381086662', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitf8c0438427ea358f45c5d867586b1c86', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitae061628df81b43cbeda68c381086662::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitf8c0438427ea358f45c5d867586b1c86::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInitae061628df81b43cbeda68c381086662::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitf8c0438427ea358f45c5d867586b1c86::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitae061628df81b43cbeda68c381086662
class ComposerStaticInitf8c0438427ea358f45c5d867586b1c86
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3134,9 +3134,9 @@ class ComposerStaticInitae061628df81b43cbeda68c381086662
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitae061628df81b43cbeda68c381086662::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitae061628df81b43cbeda68c381086662::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitae061628df81b43cbeda68c381086662::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitf8c0438427ea358f45c5d867586b1c86::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf8c0438427ea358f45c5d867586b1c86::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf8c0438427ea358f45c5d867586b1c86::$classMap;

}, null, ClassLoader::class);
}
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1916,12 +1916,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git",
"reference": "b610182bba8fd1a911a7a3a5367109737d90dd30"
"reference": "5fe59e9f3a2ef37bacca898a7a7dd438cc389626"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/b610182bba8fd1a911a7a3a5367109737d90dd30",
"reference": "b610182bba8fd1a911a7a3a5367109737d90dd30",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/5fe59e9f3a2ef37bacca898a7a7dd438cc389626",
"reference": "5fe59e9f3a2ef37bacca898a7a7dd438cc389626",
"shasum": ""
},
"require": {
Expand All @@ -1940,15 +1940,15 @@
"rector\/phpstan-rules": "^0.6",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6.10",
"rector\/rector-src": "dev-hanlde-default-value-expr-null",
"rector\/rector-src": "dev-main",
"symplify\/easy-ci": "^11.2",
"symplify\/easy-coding-standard": "^11.2",
"symplify\/phpstan-extensions": "^11.1",
"symplify\/phpstan-rules": "^11.1",
"symplify\/rule-doc-generator": "^11.1",
"symplify\/vendor-patches": "^11.1"
},
"time": "2023-03-03T09:54:32+00:00",
"time": "2023-03-03T10:04:37+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
Expand Down

0 comments on commit bc4d628

Please sign in to comment.