Skip to content

Commit f81b374

Browse files
phpstan-botclaude
andcommitted
Deduplicate bug-11430 test data files for Methods and nsrt
Use a single test data file in nsrt/ for both the ReturnTypeRule test and the NodeScopeResolver assertType test, instead of maintaining two nearly identical copies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ceef2e7 commit f81b374

3 files changed

Lines changed: 3 additions & 86 deletions

File tree

tests/PHPStan/Analyser/nsrt/bug-11430.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types = 1);
22

3-
namespace Bug11430Nsrt;
3+
namespace Bug11430Methods;
44

55
use function PHPStan\Testing\assertType;
66

@@ -95,4 +95,4 @@ class Test
9595
/** @var ?string $foo */
9696
$foo = null;
9797
$test->name = Option::fromValue($foo);
98-
assertType('Bug11430Nsrt\Option<string>', $test->name);
98+
assertType('Bug11430Methods\Option<string>', $test->name);

tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ public function testBug10924(): void
13281328

13291329
public function testBug11430(): void
13301330
{
1331-
$this->analyse([__DIR__ . '/data/bug-11430.php'], []);
1331+
$this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-11430.php'], []);
13321332
}
13331333

13341334
}

tests/PHPStan/Rules/Methods/data/bug-11430.php

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)