Skip to content

Commit

Permalink
Updated Rector to commit f08216fc30ced0d29868a18cd1c2504a1a10ecd0
Browse files Browse the repository at this point in the history
rectorphp/rector-src@f08216f [CodeQuality] Skip with break on SwitchTrueToIfRector (#3634)
  • Loading branch information
TomasVotruba committed Apr 20, 2023
1 parent 9c02097 commit 1cb1664
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions rules/CodeQuality/Rector/Switch_/SwitchTrueToIfRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Case_;
use PhpParser\Node\Stmt\If_;
use PhpParser\Node\Stmt\Return_;
use PhpParser\Node\Stmt\Switch_;
use Rector\Core\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
Expand Down Expand Up @@ -75,6 +76,9 @@ public function refactor(Node $node) : ?array
$newStmts = [];
$defaultCase = null;
foreach ($node->cases as $case) {
if (!\end($case->stmts) instanceof Return_) {
return null;
}
if (!$case->cond instanceof Expr) {
$defaultCase = $case;
continue;
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 = 'f453969311462cd11987768ae1b2843f38cadcb3';
public const PACKAGE_VERSION = 'f08216fc30ced0d29868a18cd1c2504a1a10ecd0';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-04-20 07:16:36';
public const RELEASE_DATE = '2023-04-20 07:22:04';
/**
* @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 ComposerAutoloaderInit34ab03c21c233c43f1265d63a292fa57::getLoader();
return ComposerAutoloaderInit8e452c908c559e2af302722842f28e3a::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 ComposerAutoloaderInit34ab03c21c233c43f1265d63a292fa57
class ComposerAutoloaderInit8e452c908c559e2af302722842f28e3a
{
private static $loader;

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

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

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

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

$filesToLoad = \Composer\Autoload\ComposerStaticInit34ab03c21c233c43f1265d63a292fa57::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit8e452c908c559e2af302722842f28e3a::$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 ComposerStaticInit34ab03c21c233c43f1265d63a292fa57
class ComposerStaticInit8e452c908c559e2af302722842f28e3a
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3144,9 +3144,9 @@ class ComposerStaticInit34ab03c21c233c43f1265d63a292fa57
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit34ab03c21c233c43f1265d63a292fa57::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit34ab03c21c233c43f1265d63a292fa57::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit34ab03c21c233c43f1265d63a292fa57::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit8e452c908c559e2af302722842f28e3a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8e452c908c559e2af302722842f28e3a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8e452c908c559e2af302722842f28e3a::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit 1cb1664

Please sign in to comment.