mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-27 13:13:31 +00:00
Updated Rector to commit bda645d0ab5e26f21a4c56fbaaffed719ff187d2
bda645d0ab
[Strict] Add $hasChanged flag on BooleanInIfConditionRuleFixerRector (#4535)
This commit is contained in:
parent
f7109e0cbd
commit
0fc823c862
|
@ -72,11 +72,13 @@ CODE_SAMPLE
|
|||
*/
|
||||
public function refactorWithScope(Node $node, Scope $scope) : ?If_
|
||||
{
|
||||
$hasChanged = \false;
|
||||
// 1. if
|
||||
$ifCondExprType = $scope->getType($node->cond);
|
||||
$notIdentical = $this->exactCompareFactory->createNotIdenticalFalsyCompare($ifCondExprType, $node->cond, $this->treatAsNonEmpty);
|
||||
if ($notIdentical !== null) {
|
||||
$node->cond = $notIdentical;
|
||||
$hasChanged = \true;
|
||||
}
|
||||
// 2. elseifs
|
||||
foreach ($node->elseifs as $elseif) {
|
||||
|
@ -86,7 +88,11 @@ CODE_SAMPLE
|
|||
continue;
|
||||
}
|
||||
$elseif->cond = $notIdentical;
|
||||
$hasChanged = \true;
|
||||
}
|
||||
return $node;
|
||||
if ($hasChanged) {
|
||||
return $node;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '490bd72c85d61feaf426d51d61bf9d04d40a418e';
|
||||
public const PACKAGE_VERSION = 'bda645d0ab5e26f21a4c56fbaaffed719ff187d2';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-07-19 11:32:20';
|
||||
public const RELEASE_DATE = '2023-07-19 11:32:49';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit5c62e43626f4be0fac8477792ce3c16d::getLoader();
|
||||
return ComposerAutoloaderInit2738bf3d72a7235658e342bfdc33ba04::getLoader();
|
||||
|
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit5c62e43626f4be0fac8477792ce3c16d
|
||||
class ComposerAutoloaderInit2738bf3d72a7235658e342bfdc33ba04
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInit5c62e43626f4be0fac8477792ce3c16d
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit5c62e43626f4be0fac8477792ce3c16d', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2738bf3d72a7235658e342bfdc33ba04', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit5c62e43626f4be0fac8477792ce3c16d', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2738bf3d72a7235658e342bfdc33ba04', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit5c62e43626f4be0fac8477792ce3c16d::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2738bf3d72a7235658e342bfdc33ba04::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit5c62e43626f4be0fac8477792ce3c16d::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit2738bf3d72a7235658e342bfdc33ba04::$files;
|
||||
$requireFile = \Closure::bind(static function ($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 ComposerStaticInit5c62e43626f4be0fac8477792ce3c16d
|
||||
class ComposerStaticInit2738bf3d72a7235658e342bfdc33ba04
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3027,9 +3027,9 @@ class ComposerStaticInit5c62e43626f4be0fac8477792ce3c16d
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit5c62e43626f4be0fac8477792ce3c16d::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit5c62e43626f4be0fac8477792ce3c16d::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit5c62e43626f4be0fac8477792ce3c16d::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2738bf3d72a7235658e342bfdc33ba04::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2738bf3d72a7235658e342bfdc33ba04::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2738bf3d72a7235658e342bfdc33ba04::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user