mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
Updated Rector to commit 0d9828f9d90ee0dd4b50f759c150575785cce6b8
0d9828f9d9
[automated] Apply Coding Standard (#4265)
This commit is contained in:
parent
fba1230ae5
commit
071632b237
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';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit22ea98379f4b405d47cc9e2e747ddd2a::getLoader();
|
return ComposerAutoloaderInit8c35cca90ed5f80fa311a589eebd66f9::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
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInit22ea98379f4b405d47cc9e2e747ddd2a
|
class ComposerAutoloaderInit8c35cca90ed5f80fa311a589eebd66f9
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit22ea98379f4b405d47cc9e2e747ddd2a
|
|||||||
return self::$loader;
|
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__));
|
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';
|
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->setClassMapAuthoritative(true);
|
||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::$files;
|
$filesToLoad = \Composer\Autoload\ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::$files;
|
||||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
$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;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a
|
class ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||||
@ -3094,9 +3094,9 @@ class ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a
|
|||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInit22ea98379f4b405d47cc9e2e747ddd2a::$classMap;
|
$loader->classMap = ComposerStaticInit8c35cca90ed5f80fa311a589eebd66f9::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -1982,12 +1982,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
|
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
|
||||||
"reference": "65c93a430da2f08f11228c00f2cef2fc637af442"
|
"reference": "6935466206df434288f406717cb077cf7a0d41ed"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/65c93a430da2f08f11228c00f2cef2fc637af442",
|
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/6935466206df434288f406717cb077cf7a0d41ed",
|
||||||
"reference": "65c93a430da2f08f11228c00f2cef2fc637af442",
|
"reference": "6935466206df434288f406717cb077cf7a0d41ed",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2011,7 +2011,7 @@
|
|||||||
"tomasvotruba\/type-coverage": "^0.2",
|
"tomasvotruba\/type-coverage": "^0.2",
|
||||||
"tomasvotruba\/unused-public": "^0.1"
|
"tomasvotruba\/unused-public": "^0.1"
|
||||||
},
|
},
|
||||||
"time": "2023-06-16T03:52:01+00:00",
|
"time": "2023-06-18T02:27:23+00:00",
|
||||||
"default-branch": true,
|
"default-branch": true,
|
||||||
"type": "rector-extension",
|
"type": "rector-extension",
|
||||||
"extra": {
|
"extra": {
|
||||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||||||
*/
|
*/
|
||||||
final class GeneratedConfig
|
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()
|
private function __construct()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\DowngradePhp72\NodeManipulator;
|
namespace Rector\DowngradePhp72\NodeManipulator;
|
||||||
|
|
||||||
|
use PhpParser\Node;
|
||||||
use PhpParser\Node\Expr;
|
use PhpParser\Node\Expr;
|
||||||
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
|
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
|
||||||
use PhpParser\Node\Expr\ConstFetch;
|
use PhpParser\Node\Expr\ConstFetch;
|
||||||
@ -27,11 +28,11 @@ final class JsonConstCleaner
|
|||||||
*/
|
*/
|
||||||
public function clean($node, array $constants) : ?\PhpParser\Node\Expr
|
public function clean($node, array $constants) : ?\PhpParser\Node\Expr
|
||||||
{
|
{
|
||||||
if ($node instanceof ConstFetch) {
|
if ($node instanceof BitwiseOr) {
|
||||||
return $this->cleanByConstFetch($node, $constants);
|
|
||||||
}
|
|
||||||
return $this->cleanByBitwiseOr($node, $constants);
|
return $this->cleanByBitwiseOr($node, $constants);
|
||||||
}
|
}
|
||||||
|
return $this->cleanByConstFetch($node, $constants);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param array<JsonConstant::*> $constants
|
* @param array<JsonConstant::*> $constants
|
||||||
*/
|
*/
|
||||||
@ -40,10 +41,6 @@ final class JsonConstCleaner
|
|||||||
if (!$this->nodeNameResolver->isNames($constFetch, $constants)) {
|
if (!$this->nodeNameResolver->isNames($constFetch, $constants)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$parentNode = $constFetch->getAttribute(AttributeKey::PARENT_NODE);
|
|
||||||
if ($parentNode instanceof BitwiseOr) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return new LNumber(0);
|
return new LNumber(0);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -70,6 +67,9 @@ final class JsonConstCleaner
|
|||||||
*/
|
*/
|
||||||
private function isTransformed(Expr $expr, array $constants) : bool
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user