mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-21 10:32:24 +00:00
Updated Rector to commit a9d29826d4
a9d29826d4
[Php70] Handle reverse sorting check on IfToSpaceshipRector (#1676)
This commit is contained in:
parent
eaaacf8462
commit
617dc40fda
|
@ -109,21 +109,28 @@ CODE_SAMPLE
|
|||
if (!$this->areVariablesEqual($condition, $this->firstValue, $this->secondValue)) {
|
||||
return null;
|
||||
}
|
||||
if ([$this->onGreater, $this->onEqual, $this->onSmaller] === [1, 0, -1]) {
|
||||
return $this->processReturnSpaceship($this->secondValue, $this->firstValue);
|
||||
}
|
||||
// is spaceship return values?
|
||||
if ([$this->onGreater, $this->onEqual, $this->onSmaller] !== [-1, 0, 1]) {
|
||||
return null;
|
||||
}
|
||||
if ($this->nextNode !== null) {
|
||||
$this->removeNode($this->nextNode);
|
||||
}
|
||||
// spaceship ready!
|
||||
$spaceship = new \PhpParser\Node\Expr\BinaryOp\Spaceship($this->secondValue, $this->firstValue);
|
||||
return new \PhpParser\Node\Stmt\Return_($spaceship);
|
||||
return $this->processReturnSpaceship($this->firstValue, $this->secondValue);
|
||||
}
|
||||
public function provideMinPhpVersion() : int
|
||||
{
|
||||
return \Rector\Core\ValueObject\PhpVersionFeature::SPACESHIP;
|
||||
}
|
||||
private function processReturnSpaceship(\PhpParser\Node\Expr $firstValue, \PhpParser\Node\Expr $secondValue) : \PhpParser\Node\Stmt\Return_
|
||||
{
|
||||
if ($this->nextNode !== null) {
|
||||
$this->removeNode($this->nextNode);
|
||||
}
|
||||
// spaceship ready!
|
||||
$spaceship = new \PhpParser\Node\Expr\BinaryOp\Spaceship($secondValue, $firstValue);
|
||||
return new \PhpParser\Node\Stmt\Return_($spaceship);
|
||||
}
|
||||
private function reset() : void
|
||||
{
|
||||
$this->onEqual = null;
|
||||
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'a17759c0504dae048ef556a324e08415196c50d5';
|
||||
public const PACKAGE_VERSION = 'a9d29826d4e80a157a4ea680671b8f5916ffd580';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-01-14 16:46:38';
|
||||
public const RELEASE_DATE = '2022-01-15 00:18:48';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20220114\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -4,4 +4,4 @@
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7::getLoader();
|
||||
return ComposerAutoloaderInit05189c9849c10cb695a1a8973dc18118::getLoader();
|
||||
|
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7
|
||||
class ComposerAutoloaderInit05189c9849c10cb695a1a8973dc18118
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,15 +22,15 @@ class ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit05189c9849c10cb695a1a8973dc18118', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit05189c9849c10cb695a1a8973dc18118', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit6269c4cf317482efab17fd60da8dd2c7::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit05189c9849c10cb695a1a8973dc18118::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
|
@ -42,12 +42,12 @@ class ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7
|
|||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit6269c4cf317482efab17fd60da8dd2c7::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit05189c9849c10cb695a1a8973dc18118::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire6269c4cf317482efab17fd60da8dd2c7($fileIdentifier, $file);
|
||||
composerRequire05189c9849c10cb695a1a8973dc18118($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -59,7 +59,7 @@ class ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire6269c4cf317482efab17fd60da8dd2c7($fileIdentifier, $file)
|
||||
function composerRequire05189c9849c10cb695a1a8973dc18118($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 ComposerStaticInit6269c4cf317482efab17fd60da8dd2c7
|
||||
class ComposerStaticInit05189c9849c10cb695a1a8973dc18118
|
||||
{
|
||||
public static $files = array (
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
|
@ -3865,9 +3865,9 @@ class ComposerStaticInit6269c4cf317482efab17fd60da8dd2c7
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit6269c4cf317482efab17fd60da8dd2c7::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit6269c4cf317482efab17fd60da8dd2c7::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit6269c4cf317482efab17fd60da8dd2c7::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit05189c9849c10cb695a1a8973dc18118::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit05189c9849c10cb695a1a8973dc18118::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit05189c9849c10cb695a1a8973dc18118::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
16
vendor/composer/installed.json
vendored
16
vendor/composer/installed.json
vendored
|
@ -1012,17 +1012,17 @@
|
|||
},
|
||||
{
|
||||
"name": "phpstan\/phpstan",
|
||||
"version": "1.3.3",
|
||||
"version_normalized": "1.3.3.0",
|
||||
"version": "1.4.0",
|
||||
"version_normalized": "1.4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
|
||||
"reference": "151a51f6149855785fbd883e79768c0abc96b75f"
|
||||
"reference": "72b04d97b5e6e60a081f17c416fef35bd521120b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/151a51f6149855785fbd883e79768c0abc96b75f",
|
||||
"reference": "151a51f6149855785fbd883e79768c0abc96b75f",
|
||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/72b04d97b5e6e60a081f17c416fef35bd521120b",
|
||||
"reference": "72b04d97b5e6e60a081f17c416fef35bd521120b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1031,7 +1031,7 @@
|
|||
"conflict": {
|
||||
"phpstan\/phpstan-shim": "*"
|
||||
},
|
||||
"time": "2022-01-07T09:49:03+00:00",
|
||||
"time": "2022-01-14T15:58:47+00:00",
|
||||
"bin": [
|
||||
"phpstan",
|
||||
"phpstan.phar"
|
||||
|
@ -1039,7 +1039,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -1055,7 +1055,7 @@
|
|||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/phpstan\/phpstan\/issues",
|
||||
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.3.3"
|
||||
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
2
vendor/phpstan/phpstan/composer.json
vendored
2
vendor/phpstan/phpstan/composer.json
vendored
|
@ -16,7 +16,7 @@
|
|||
],
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
BIN
vendor/phpstan/phpstan/phpstan.phar
vendored
BIN
vendor/phpstan/phpstan/phpstan.phar
vendored
Binary file not shown.
26
vendor/phpstan/phpstan/phpstan.phar.asc
vendored
26
vendor/phpstan/phpstan/phpstan.phar.asc
vendored
|
@ -1,16 +1,16 @@
|
|||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmHYDI4ACgkQzxoQjQ56
|
||||
5yDZKA/8CdsoOocXxJvA9aJZSCszu7+/l5AZFTKjemR1hbpsiHCHfqDkdFZGYd3j
|
||||
j1FZkYn6yyiJnY+WfEfwYjqtscoDcyfaunONrmOtw3iDUrxXkla60SBxN2b1sufA
|
||||
jnkg2iKXksTh4Xxh6frHxo6uqRVweW60FPDfA//DaJgAASiSP+YA2Wl8iVyVNS8L
|
||||
C4Xs4Jwp21TUlnRndCa4QSZLOPzdnypc3yfNfF1mCv1CeU5f2BWWjCH8ErikRTWy
|
||||
61rSfDA8wHEvrpLC5ktu/Qk5f1XwZyw306q7O30BwwtzSFg6d5KagXU7nDIwLPhd
|
||||
DD2bPW8DI3wV+1cXxigUEmJTMaYKSQflh+B7VU6gmFwN2bPdILBb6GIGPYGVJace
|
||||
LZ3nL7t8qEmxlzrx/xmEobZn/KZ4j+dykgrLHojb7zAwiliLFAFuG99M+PLUWhVv
|
||||
xfj58D+HtE5si3d7E4sbJIZHs9BVmeFShlG5pMYIKMq5XRyr0aZLdNUBchJdINTS
|
||||
9iVF5vQcpYKpe1EMa90k1SqYW/02oDuOia2mMhmXZNQnpQBnTRoem5JgSAmBRkP2
|
||||
0Utsx37ieHdPFzT5cP8/USE0ojxYWboG05CVcaL7ez8VYj2qFQTkfwLVF0sACHqb
|
||||
VPXxBweKES0ZBXbeD8Im2ArLvWP4aEKmD7R/yn7fqICKLJuR9iM=
|
||||
=hEnx
|
||||
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmHhnbYACgkQzxoQjQ56
|
||||
5yDuNhAAovdKByK5Z+1Xr0INZmkgYLVrDP/ZKaRhw+Xi47/zJos0hmcc5y+ZsFMV
|
||||
I7buxw4W1s6Q3WXzfRmiRRIZpS2AnP2Dm8Jp5nIoc+oAp+mDbJwuMrpOLM6PcWI+
|
||||
rRLlPJB7BJT6+5B4woBD3TVQxrGyRmo0m2FrU3IpoTGll5au76wceADi1ZNIjZxe
|
||||
IL2l/pxaXIk2yfjSBslZjiAgRJpehTPsi2LS/F7o6Zozp/pAzWFveodv0DjNM+cK
|
||||
Lg2hZvVHE2xua0/3/zWN54TdICMAP9t8ckD0Zmhv1n9vaE7foyRbdv6eFjG5PGAE
|
||||
kfSQivbqCI6vtxiTeRO4XwZghcrv1dauO9+1M6Puv7RGc5Y/L8qyV936ztmW18e8
|
||||
1lK3y7BFUqBECgc76n8SvwadiryIMwxIIrLmwaZ5+F5tRvHO4o8Zp1WjlcKXxIff
|
||||
n056s+SBVm4gaBbT2yPTuHN46hJmQ9RjmYaDcMmD2mOETpcRSCkS+/9f3s1t1673
|
||||
iHA3+GYlcL5QXjyQSjMu0a9JTq3ZG9wrWAGn/ckT9qJtR4iVyGwXzxmSDPP0uD0D
|
||||
nbAZ6bEenUJnyi4MC8VzwKxmidmE2TI0bqO7iTH+PQYWpIdKcRZzBN0HiBBdi9n8
|
||||
jqa7CSrufhMr7joWgWen/01QVwmXQXwdXgPzxOxhYzzXVIKk1Pk=
|
||||
=cWE1
|
||||
-----END PGP SIGNATURE-----
|
||||
|
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
|
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
|||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220114\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7', false) && !interface_exists('ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7', false) && !trait_exists('ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7', false)) {
|
||||
spl_autoload_call('RectorPrefix20220114\ComposerAutoloaderInit6269c4cf317482efab17fd60da8dd2c7');
|
||||
if (!class_exists('ComposerAutoloaderInit05189c9849c10cb695a1a8973dc18118', false) && !interface_exists('ComposerAutoloaderInit05189c9849c10cb695a1a8973dc18118', false) && !trait_exists('ComposerAutoloaderInit05189c9849c10cb695a1a8973dc18118', false)) {
|
||||
spl_autoload_call('RectorPrefix20220114\ComposerAutoloaderInit05189c9849c10cb695a1a8973dc18118');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220114\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
|
@ -71,9 +71,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20220114\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire6269c4cf317482efab17fd60da8dd2c7')) {
|
||||
function composerRequire6269c4cf317482efab17fd60da8dd2c7() {
|
||||
return \RectorPrefix20220114\composerRequire6269c4cf317482efab17fd60da8dd2c7(...func_get_args());
|
||||
if (!function_exists('composerRequire05189c9849c10cb695a1a8973dc18118')) {
|
||||
function composerRequire05189c9849c10cb695a1a8973dc18118() {
|
||||
return \RectorPrefix20220114\composerRequire05189c9849c10cb695a1a8973dc18118(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user