Skip to content

Commit 9e60cd5

Browse files
committed
Tests/BackfillFnTokenTest: minor tweaks
Variable names were meant to be descriptive, but with copy/paste, they weren't. Fixed now.
1 parent b6e4361 commit 9e60cd5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/Core/Tokenizers/PHP/BackfillFnTokenTest.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,19 @@ $arrowWithUnionReturn = fn($param) : int|true => $param | 10;
120120
$arrowWithUnionReturn = fn($param) : string|FALSE => $param | 10;
121121

122122
/* testIntersectionParamType */
123-
$arrowWithUnionParam = fn(Traversable&Countable $param) : int => (new SomeClass($param))->getValue();
123+
$arrowWithIntersectionParam = fn(Traversable&Countable $param) : int => (new SomeClass($param))->getValue();
124124

125125
/* testIntersectionReturnType */
126-
$arrowWithUnionReturn = fn($param) : \MyFoo&SomeInterface => new SomeClass($param);
126+
$arrowWithIntersectionReturn = fn($param) : \MyFoo&SomeInterface => new SomeClass($param);
127127

128128
/* testDNFParamType */
129-
$arrowWithUnionParam = fn((Traversable&Countable)|null $param) : SomeClass => new SomeClass($param) ?? null;
129+
$arrowWithDNFParam = fn((Traversable&Countable)|null $param) : SomeClass => new SomeClass($param) ?? null;
130130

131131
/* testDNFReturnType */
132-
$arrowWithUnionReturn = fn($param) : false|(\MyFoo&SomeInterface) => new \MyFoo($param) ?? false;
132+
$arrowWithDNFReturn = fn($param) : false|(\MyFoo&SomeInterface) => new \MyFoo($param) ?? false;
133133

134134
/* testDNFParamTypeWithReturnByRef */
135-
$arrowWithParamReturnByRef = fn &((A&B)|null $param) => $param * 10;
135+
$arrowWithDNFParamReturnByRef = fn &((A&B)|null $param) => $param * 10;
136136

137137
/* testTernary */
138138
$fn = fn($a) => $a ? /* testTernaryThen */ fn() : string => 'a' : /* testTernaryElse */ fn() : string => 'b';

0 commit comments

Comments
 (0)