Updated Rector to commit 3d02e3ec8f3a7d03adc3f23c315e57850dc8379a

3d02e3ec8f  [CodeQuality] Skip sort/ksort on TernaryFalseExpressionToIfRector  (#5703)
This commit is contained in:
Tomas Votruba 2024-03-09 13:24:41 +00:00
parent 28f5dbde13
commit 309ceb4ee6
7 changed files with 19 additions and 18 deletions

View File

@ -233,6 +233,8 @@ final class PureFunctionDetector
'array_splice',
'next',
'prev',
'sort',
'ksort',
// stream
'stream_filter_append',
];

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'c14f8d45175bd4c10fef503e350d677c4a73ce29';
public const PACKAGE_VERSION = '3d02e3ec8f3a7d03adc3f23c315e57850dc8379a';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-03-08 06:31:37';
public const RELEASE_DATE = '2024-03-09 20:22:17';
/**
* @var int
*/

View File

@ -1742,12 +1742,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "e4776356ac976734d56072410185fe06594cc642"
"reference": "9a6a85b2b37c51a5c83414269dc2aab09650967f"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/e4776356ac976734d56072410185fe06594cc642",
"reference": "e4776356ac976734d56072410185fe06594cc642",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/9a6a85b2b37c51a5c83414269dc2aab09650967f",
"reference": "9a6a85b2b37c51a5c83414269dc2aab09650967f",
"shasum": ""
},
"require": {
@ -1769,7 +1769,7 @@
"tomasvotruba\/class-leak": "^0.2",
"tracy\/tracy": "^2.10"
},
"time": "2024-03-08T06:25:11+00:00",
"time": "2024-03-08T06:34:42+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -1802,12 +1802,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "e065c40ada5c10d6e6b2a1de4e870de84c0de8f6"
"reference": "6845db43ccd69ef990d399ff845a53ad66fa8085"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/e065c40ada5c10d6e6b2a1de4e870de84c0de8f6",
"reference": "e065c40ada5c10d6e6b2a1de4e870de84c0de8f6",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/6845db43ccd69ef990d399ff845a53ad66fa8085",
"reference": "6845db43ccd69ef990d399ff845a53ad66fa8085",
"shasum": ""
},
"require": {
@ -1830,7 +1830,7 @@
"tomasvotruba\/class-leak": "^0.2",
"tracy\/tracy": "^2.10"
},
"time": "2024-03-05T13:36:33+00:00",
"time": "2024-03-08T15:37:45+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/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main a1d50bb'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main e477635'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main e065c40'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 5ce789d'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main a1d50bb'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 9a6a85b'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 6845db4'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 5ce789d'));
private function __construct()
{
}

View File

@ -181,11 +181,10 @@ CODE_SAMPLE
}
$newStmts[] = $stmt;
$resetExpression = new Expression($this->nodeFactory->createFuncCall('reset', [$array]));
if (!$stmt instanceof StmtsAwareInterface && !$stmt instanceof Return_) {
$newStmts[] = new Expression($this->nodeFactory->createFuncCall('reset', [$array]));
}
if ($stmt instanceof StmtsAwareInterface) {
$stmt->stmts = \array_merge([$resetExpression], $stmt->stmts);
} elseif (!$stmt instanceof Return_) {
$newStmts[] = $resetExpression;
}
return $newStmts;
}

View File

@ -76,15 +76,15 @@ CODE_SAMPLE
if (!\is_string($methodName)) {
return null;
}
if (\strncmp($methodName, 'assert', \strlen('assert')) !== 0) {
return null;
}
if (!$this->isName($node->var, 'this')) {
return null;
}
if (!$this->isObjectType($node->var, new ObjectType('PHPUnit\\Framework\\TestCase'))) {
return null;
}
if (\strncmp($methodName, 'assert', \strlen('assert')) !== 0) {
return null;
}
$hasChanged = \true;
return $this->nodeFactory->createStaticCall('self', $methodName, $node->getArgs());
});