Skip to content

Commit 7c85880

Browse files
committed
Updated Rector to commit 142f1c81c7a9d26fd5119526186aba14f4cf6382
rectorphp/rector-src@142f1c8 [DeadCode] Handle only remove 1 @var on multi vars on RemoveUselessVarTagRector (#7884)
1 parent cc00d60 commit 7c85880

5 files changed

Lines changed: 15 additions & 8 deletions

File tree

vendor/composer/installed.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,12 +1818,12 @@
18181818
"source": {
18191819
"type": "git",
18201820
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
1821-
"reference": "7a914ca53f0576bcfbda803421701ebf850a4dfe"
1821+
"reference": "a2e10b59880655fd19146cd53916efc993380b48"
18221822
},
18231823
"dist": {
18241824
"type": "zip",
1825-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/7a914ca53f0576bcfbda803421701ebf850a4dfe",
1826-
"reference": "7a914ca53f0576bcfbda803421701ebf850a4dfe",
1825+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/a2e10b59880655fd19146cd53916efc993380b48",
1826+
"reference": "a2e10b59880655fd19146cd53916efc993380b48",
18271827
"shasum": ""
18281828
},
18291829
"require": {
@@ -1850,7 +1850,7 @@
18501850
"tomasvotruba\/unused-public": "^2.2",
18511851
"tracy\/tracy": "^2.11"
18521852
},
1853-
"time": "2026-02-06T14:19:09+00:00",
1853+
"time": "2026-02-06T21:12:47+00:00",
18541854
"default-branch": true,
18551855
"type": "rector-extension",
18561856
"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 46e4f77'), '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 a110e2f'), '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 7a914ca'), '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 eadb590'));
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 46e4f77'), '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 a110e2f'), '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 a2e10b5'), '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 eadb590'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-phpunit/rules/CodeQuality/Rector/ClassMethod/NoSetupWithParentCallOverrideRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(TestsNodeAnalyzer $testsNodeAnalyzer, ParentCallDete
3636
}
3737
public function getRuleDefinition(): RuleDefinition
3838
{
39-
return new RuleDefinition('Remove override, if setUp() references parent::setUp() call to improve readability', [new CodeSample(<<<'CODE_SAMPLE'
39+
return new RuleDefinition('Remove override attribute, if setUp()/tearDown() references parent call to improve readability', [new CodeSample(<<<'CODE_SAMPLE'
4040
use PHPUnit\Framework\TestCase;
4141
4242
final class SomeTest extends TestCase
@@ -80,7 +80,7 @@ public function refactor(Node $node): ?Node
8080
if (!$this->testsNodeAnalyzer->isInTestClass($node)) {
8181
return null;
8282
}
83-
if (!$this->isName($node, 'setUp')) {
83+
if (!$this->isNames($node, ['setUp', 'tearDown'])) {
8484
return null;
8585
}
8686
if (!$this->parentCallDetector->hasParentCall($node)) {

vendor/rector/rector-phpunit/rules/CodeQuality/Rector/Expression/DecorateWillReturnMapWithExpectsMockRector.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
use PhpParser\Node\Identifier;
1212
use PhpParser\Node\Scalar\Int_;
1313
use PhpParser\Node\Stmt\Expression;
14+
use Rector\PHPStan\ScopeFetcher;
1415
use Rector\Rector\AbstractRector;
16+
use Rector\ValueObject\MethodName;
1517
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
1618
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
1719
/**
@@ -81,6 +83,11 @@ public function refactor(Node $node)
8183
if (!$this->isName($methodCall->name, 'willReturnMap')) {
8284
return null;
8385
}
86+
$scope = ScopeFetcher::fetch($node);
87+
// allowed as can be flexible
88+
if ($scope->getFunctionName() === MethodName::SET_UP) {
89+
return null;
90+
}
8491
$topmostCall = $this->resolveTopmostCall($methodCall);
8592
// already covered
8693
if ($this->isName($topmostCall->name, 'expects')) {

0 commit comments

Comments
 (0)