Skip to content

Commit 309ceb4

Browse files
committed
Updated Rector to commit 3d02e3ec8f3a7d03adc3f23c315e57850dc8379a
rectorphp/rector-src@3d02e3e [CodeQuality] Skip sort/ksort on TernaryFalseExpressionToIfRector (#5703)
1 parent 28f5dbd commit 309ceb4

File tree

7 files changed

+19
-18
lines changed

7 files changed

+19
-18
lines changed

rules/DeadCode/SideEffect/PureFunctionDetector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ final class PureFunctionDetector
233233
'array_splice',
234234
'next',
235235
'prev',
236+
'sort',
237+
'ksort',
236238
// stream
237239
'stream_filter_append',
238240
];

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'c14f8d45175bd4c10fef503e350d677c4a73ce29';
22+
public const PACKAGE_VERSION = '3d02e3ec8f3a7d03adc3f23c315e57850dc8379a';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2024-03-08 06:31:37';
27+
public const RELEASE_DATE = '2024-03-09 20:22:17';
2828
/**
2929
* @var int
3030
*/

vendor/composer/installed.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,12 +1742,12 @@
17421742
"source": {
17431743
"type": "git",
17441744
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
1745-
"reference": "e4776356ac976734d56072410185fe06594cc642"
1745+
"reference": "9a6a85b2b37c51a5c83414269dc2aab09650967f"
17461746
},
17471747
"dist": {
17481748
"type": "zip",
1749-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/e4776356ac976734d56072410185fe06594cc642",
1750-
"reference": "e4776356ac976734d56072410185fe06594cc642",
1749+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/9a6a85b2b37c51a5c83414269dc2aab09650967f",
1750+
"reference": "9a6a85b2b37c51a5c83414269dc2aab09650967f",
17511751
"shasum": ""
17521752
},
17531753
"require": {
@@ -1769,7 +1769,7 @@
17691769
"tomasvotruba\/class-leak": "^0.2",
17701770
"tracy\/tracy": "^2.10"
17711771
},
1772-
"time": "2024-03-08T06:25:11+00:00",
1772+
"time": "2024-03-08T06:34:42+00:00",
17731773
"default-branch": true,
17741774
"type": "rector-extension",
17751775
"extra": {
@@ -1802,12 +1802,12 @@
18021802
"source": {
18031803
"type": "git",
18041804
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
1805-
"reference": "e065c40ada5c10d6e6b2a1de4e870de84c0de8f6"
1805+
"reference": "6845db43ccd69ef990d399ff845a53ad66fa8085"
18061806
},
18071807
"dist": {
18081808
"type": "zip",
1809-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/e065c40ada5c10d6e6b2a1de4e870de84c0de8f6",
1810-
"reference": "e065c40ada5c10d6e6b2a1de4e870de84c0de8f6",
1809+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/6845db43ccd69ef990d399ff845a53ad66fa8085",
1810+
"reference": "6845db43ccd69ef990d399ff845a53ad66fa8085",
18111811
"shasum": ""
18121812
},
18131813
"require": {
@@ -1830,7 +1830,7 @@
18301830
"tomasvotruba\/class-leak": "^0.2",
18311831
"tracy\/tracy": "^2.10"
18321832
},
1833-
"time": "2024-03-05T13:36:33+00:00",
1833+
"time": "2024-03-08T15:37:45+00:00",
18341834
"default-branch": true,
18351835
"type": "rector-extension",
18361836
"extra": {

vendor/composer/installed.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

vendor/rector/extension-installer/src/GeneratedConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
final class GeneratedConfig
1111
{
12-
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'));
12+
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'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-downgrade-php/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,10 @@ private function refactorArrayKeyLast(FuncCall $funcCall, $stmt) : ?array
181181
}
182182
$newStmts[] = $stmt;
183183
$resetExpression = new Expression($this->nodeFactory->createFuncCall('reset', [$array]));
184-
if (!$stmt instanceof StmtsAwareInterface && !$stmt instanceof Return_) {
185-
$newStmts[] = new Expression($this->nodeFactory->createFuncCall('reset', [$array]));
186-
}
187184
if ($stmt instanceof StmtsAwareInterface) {
188185
$stmt->stmts = \array_merge([$resetExpression], $stmt->stmts);
186+
} elseif (!$stmt instanceof Return_) {
187+
$newStmts[] = $resetExpression;
189188
}
190189
return $newStmts;
191190
}

vendor/rector/rector-phpunit/src/Rector/Class_/PreferPHPUnitSelfCallRector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ public function refactor(Node $node) : ?Node
7676
if (!\is_string($methodName)) {
7777
return null;
7878
}
79-
if (!$this->isName($node->var, 'this')) {
79+
if (\strncmp($methodName, 'assert', \strlen('assert')) !== 0) {
8080
return null;
8181
}
82-
if (!$this->isObjectType($node->var, new ObjectType('PHPUnit\\Framework\\TestCase'))) {
82+
if (!$this->isName($node->var, 'this')) {
8383
return null;
8484
}
85-
if (\strncmp($methodName, 'assert', \strlen('assert')) !== 0) {
85+
if (!$this->isObjectType($node->var, new ObjectType('PHPUnit\\Framework\\TestCase'))) {
8686
return null;
8787
}
8888
$hasChanged = \true;

0 commit comments

Comments
 (0)