Skip to content

Commit d231969

Browse files
authored
Merge pull request #939 from PHPCSStandards/feature/backfillfntest-tweak
Tests/BackfillFnTokenTest: minor tweaks
2 parents aabfd5e + fb687c6 commit d231969

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
@@ -114,19 +114,19 @@ $arrowWithUnionReturn = fn($param) : int|true => $param | 10;
114114
$arrowWithUnionReturn = fn($param) : string|FALSE => $param | 10;
115115

116116
/* testIntersectionParamType */
117-
$arrowWithUnionParam = fn(Traversable&Countable $param) : int => (new SomeClass($param))->getValue();
117+
$arrowWithIntersectionParam = fn(Traversable&Countable $param) : int => (new SomeClass($param))->getValue();
118118

119119
/* testIntersectionReturnType */
120-
$arrowWithUnionReturn = fn($param) : \MyFoo&SomeInterface => new SomeClass($param);
120+
$arrowWithIntersectionReturn = fn($param) : \MyFoo&SomeInterface => new SomeClass($param);
121121

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

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

128128
/* testDNFParamTypeWithReturnByRef */
129-
$arrowWithParamReturnByRef = fn &((A&B)|null $param) => $param * 10;
129+
$arrowWithDNFParamReturnByRef = fn &((A&B)|null $param) => $param * 10;
130130

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

0 commit comments

Comments
 (0)