Updated Rector to commit 0d9828f9d90ee0dd4b50f759c150575785cce6b8

0d9828f9d9 [automated] Apply Coding Standard (#4265)
This commit is contained in:
Tomas Votruba 2023-06-18 02:32:09 +00:00
parent fba1230ae5
commit 071632b237
7 changed files with 24 additions and 24 deletions

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit22ea98379f4b405d47cc9e2e747ddd2a::getLoader();
return ComposerAutoloaderInit8c35cca90ed5f80fa311a589eebd66f9::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit22ea98379f4b405d47cc9e2e747ddd2a
class ComposerAutoloaderInit8c35cca90ed5f80fa311a589eebd66f9
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit22ea98379f4b405d47cc9e2e747ddd2a
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit22ea98379f4b405d47cc9e2e747ddd2a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit8c35cca90ed5f80fa311a589eebd66f9', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit22ea98379f4b405d47cc9e2e747ddd2a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit8c35cca90ed5f80fa311a589eebd66f9', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a
class ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3094,9 +3094,9 @@ class ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::$classMap;
}, null, ClassLoader::class);
}

View File

@ -1982,12 +1982,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "65c93a430da2f08f11228c00f2cef2fc637af442"
"reference": "6935466206df434288f406717cb077cf7a0d41ed"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/65c93a430da2f08f11228c00f2cef2fc637af442",
"reference": "65c93a430da2f08f11228c00f2cef2fc637af442",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/6935466206df434288f406717cb077cf7a0d41ed",
"reference": "6935466206df434288f406717cb077cf7a0d41ed",
"shasum": ""
},
"require": {
@ -2011,7 +2011,7 @@
"tomasvotruba\/type-coverage": "^0.2",
"tomasvotruba\/unused-public": "^0.1"
},
"time": "2023-06-16T03:52:01+00:00",
"time": "2023-06-18T02:27:23+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/
final class GeneratedConfig
{
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f0c1a5f'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 65c93a4'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5501d9d'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f1020f6'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f0c1a5f'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 6935466'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5501d9d'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f1020f6'));
private function __construct()
{
}

View File

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\DowngradePhp72\NodeManipulator;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
use PhpParser\Node\Expr\ConstFetch;
@ -27,10 +28,10 @@ final class JsonConstCleaner
*/
public function clean($node, array $constants) : ?\PhpParser\Node\Expr
{
if ($node instanceof ConstFetch) {
return $this->cleanByConstFetch($node, $constants);
if ($node instanceof BitwiseOr) {
return $this->cleanByBitwiseOr($node, $constants);
}
return $this->cleanByBitwiseOr($node, $constants);
return $this->cleanByConstFetch($node, $constants);
}
/**
* @param array<JsonConstant::*> $constants
@ -40,10 +41,6 @@ final class JsonConstCleaner
if (!$this->nodeNameResolver->isNames($constFetch, $constants)) {
return null;
}
$parentNode = $constFetch->getAttribute(AttributeKey::PARENT_NODE);
if ($parentNode instanceof BitwiseOr) {
return null;
}
return new LNumber(0);
}
/**
@ -70,6 +67,9 @@ final class JsonConstCleaner
*/
private function isTransformed(Expr $expr, array $constants) : bool
{
return $expr instanceof ConstFetch && $this->nodeNameResolver->isNames($expr, $constants);
if ($expr instanceof ConstFetch && $this->nodeNameResolver->isNames($expr, $constants)) {
return \true;
}
return !$expr->getAttribute(AttributeKey::ORIGINAL_NODE) instanceof Node;
}
}