Skip to content

Commit

Permalink
Updated Rector to commit 3cbf7104d0b81ba1b930ce9a4cd3456e1c082b43
Browse files Browse the repository at this point in the history
rectorphp/rector-src@3cbf710 [CodeQuality] Skip empty cases on SwitchTrueToIfRector (#3556)
  • Loading branch information
TomasVotruba committed Apr 2, 2023
1 parent d6c32e5 commit d7fe9b6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
5 changes: 4 additions & 1 deletion rules/CodeQuality/Rector/Switch_/SwitchTrueToIfRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public function refactor(Node $node) : ?array
$newStmts[] = $if;
}
if ($defaultCase instanceof Case_) {
return \array_merge($newStmts, $defaultCase->stmts);
$newStmts = \array_merge($newStmts, $defaultCase->stmts);
}
if ($newStmts === []) {
return null;
}
return $newStmts;
}
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 = '4e2bef6d60eac79f3ccec9606bde2b22ecbe1dd0';
public const PACKAGE_VERSION = '3cbf7104d0b81ba1b930ce9a4cd3456e1c082b43';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-04-03 02:05:23';
public const RELEASE_DATE = '2023-04-02 21:40:41';
/**
* @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 ComposerAutoloaderInit9ec34674188d12db569da8d975deaadd::getLoader();
return ComposerAutoloaderInit90b0a339f5e68da0f08b9e7390f4c7cd::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 ComposerAutoloaderInit9ec34674188d12db569da8d975deaadd
class ComposerAutoloaderInit90b0a339f5e68da0f08b9e7390f4c7cd
{
private static $loader;

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

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

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

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

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

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

0 comments on commit d7fe9b6

Please sign in to comment.