mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-07 11:50:51 +00:00
Updated Rector to commit 7ca4de097ed6b2f0f2b20a8f2b55ea2121120173
7ca4de097e
[DeadCode] Skip nullable array on RemoveUnusedNonEmptyArrayBeforeForeachRector (#5375)
This commit is contained in:
parent
949ab12adb
commit
4e82e891c9
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
|
@ -1808,12 +1808,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
|
||||
"reference": "90e87f1032026d2c9c0195a826dc1126d2c40ecd"
|
||||
"reference": "669f5eed1a738fc08bb90d7dee6ba6bf72da1302"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/90e87f1032026d2c9c0195a826dc1126d2c40ecd",
|
||||
"reference": "90e87f1032026d2c9c0195a826dc1126d2c40ecd",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/669f5eed1a738fc08bb90d7dee6ba6bf72da1302",
|
||||
"reference": "669f5eed1a738fc08bb90d7dee6ba6bf72da1302",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1843,7 +1843,7 @@
|
|||
"tomasvotruba\/unused-public": "^0.3",
|
||||
"tracy\/tracy": "^2.10"
|
||||
},
|
||||
"time": "2023-12-02T15:13:56+00:00",
|
||||
"time": "2023-12-22T07:51:11+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"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
|
||||
{
|
||||
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 c7ff3e5'), '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 917085c'), '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 90e87f1'), '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 5f1e96d'));
|
||||
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 c7ff3e5'), '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 917085c'), '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 669f5ee'), '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 5f1e96d'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ CODE_SAMPLE
|
|||
}
|
||||
$hasChanged = \false;
|
||||
$oldMethodNames = \array_keys(self::OLD_TO_NEW_METHOD);
|
||||
foreach ($node->stmts as $stmt) {
|
||||
foreach ($node->stmts as $key => $stmt) {
|
||||
if (!$stmt instanceof Expression) {
|
||||
continue;
|
||||
}
|
||||
|
@ -97,18 +97,18 @@ CODE_SAMPLE
|
|||
if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($call, $oldMethodNames)) {
|
||||
continue;
|
||||
}
|
||||
if (isset($call->args[1])) {
|
||||
$extraCall = $this->createFirstArgExtraMethodCall($call);
|
||||
$node->stmts[] = new Expression($extraCall);
|
||||
unset($call->args[1]);
|
||||
}
|
||||
// add exception code method call
|
||||
if (isset($call->args[2])) {
|
||||
$extraCall = $this->assertCallFactory->createCallWithName($call, 'expectExceptionCode');
|
||||
$extraCall->args[] = $call->args[2];
|
||||
$node->stmts[] = new Expression($extraCall);
|
||||
\array_splice($node->stmts, $key + 1, 0, [new Expression($extraCall)]);
|
||||
unset($call->args[2]);
|
||||
}
|
||||
if (isset($call->args[1])) {
|
||||
$extraCall = $this->createFirstArgExtraMethodCall($call);
|
||||
\array_splice($node->stmts, $key + 1, 0, [new Expression($extraCall)]);
|
||||
unset($call->args[1]);
|
||||
}
|
||||
$hasChanged = \true;
|
||||
$call->name = new Identifier('expectException');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user