Skip to content
This repository was archived by the owner on Aug 11, 2026. It is now read-only.

Commit a3f5d16

Browse files
committed
formatting
1 parent 3143a6b commit a3f5d16

4 files changed

Lines changed: 5 additions & 7 deletions

tests/Analysis/ExpectationChainStateResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use PHPStan\Type\VerbosityLevel;
1717

1818
/**
19-
* Regression coverage for the resolver's per-node memoisation.
19+
* Per-node WeakMap memoisation for the resolver's chain-state cache.
2020
*
2121
* The resolver is instantiated once by PHPStan's container and shared across
2222
* every analysed file. Its cache must therefore key on the node identity, not

tests/Rules/ImpossibleExpectationRuleTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@
152152
]);
153153
});
154154

155-
test('regression #32: valid expectations from bool methods, casts, and nullable properties are not falsely flagged', function (): void {
155+
test('valid expectations from bool methods, casts, and nullable properties are not falsely flagged', function (): void {
156156
$this->analyse([
157-
__DIR__ . '/data/impossible-expectation-regression-32-a.php',
158-
__DIR__ . '/data/impossible-expectation-regression-32-b.php',
157+
__DIR__ . '/data/impossible-expectation-bool-cast-nullable.php',
158+
__DIR__ . '/data/impossible-expectation-primitive-types.php',
159159
], []);
160160
});

tests/Rules/data/impossible-expectation-regression-32-a.php renamed to tests/Rules/data/impossible-expectation-bool-cast-nullable.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
declare(strict_types=1);
44

5-
// Regression tests for issue #32:
65
// These are ALL valid expectation chains. None should be flagged as impossible.
76

87
interface BoolPolicy

tests/Rules/data/impossible-expectation-regression-32-b.php renamed to tests/Rules/data/impossible-expectation-primitive-types.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
declare(strict_types=1);
44

5-
// Companion fixture for regression test issue #32.
6-
// Contains different type patterns to exercise cross-file cache interactions.
5+
// Cross-file cache interaction: basic type expectations that should never be flagged as impossible.
76

87
it('string should not be impossible for toBeString', function (): void {
98
expect('hello')->toBeString();

0 commit comments

Comments
 (0)