Skip to content

Commit f0ec2ab

Browse files
committed
Changelog + unit test rename for #2748 (ref #2749)
1 parent a922594 commit f0ec2ab

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
4444
- Fixed bug #2688 : Case statements not tokenized correctly when switch is contained within ternary
4545
- Fixed bug #2698 : PHPCS throws errors determining auto report width when shell_exec is disabled
4646
-- Thanks to Matthew Peveler for the patch
47+
- Fixed bug #2748 : Wrong end of statement for fn closures
48+
-- Thanks to Michał Bundyra for the patch
4749
- Fixed bug #2751 : Autoload relative paths first to avoid confusion with files from the global include path
4850
-- Thanks to Klaus Purer for the patch
4951
- Fixed bug #2768 : Generic.Files.LineLength false positive for non-breakable strings at exactly the soft limit

tests/Core/File/FindEndOfStatementTest.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $a = [
3636
'b' => fn() => return 1,
3737
];
3838

39-
/* testArrowFunctionEndOfStatement */
39+
/* testArrowFunction */
4040
static fn ($a) => $a;
4141

4242
return 0;

tests/Core/File/FindEndOfStatementTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,17 @@ public function testArrowFunctionArrayValue()
193193
*
194194
* @return void
195195
*/
196-
public function testArrayFunctionEndOfStatement()
196+
public function testArrowFunction()
197197
{
198-
$static = (self::$phpcsFile->findNext(T_COMMENT, 0, null, false, '/* testArrowFunctionEndOfStatement */') + 2);
198+
$static = (self::$phpcsFile->findNext(T_COMMENT, 0, null, false, '/* testArrowFunction */') + 2);
199199
$fn = self::$phpcsFile->findNext(T_FN, ($static + 1));
200200

201201
$endOfStatementStatic = self::$phpcsFile->findEndOfStatement($static);
202202
$endOfStatementFn = self::$phpcsFile->findEndOfStatement($fn);
203203

204204
$this->assertSame($endOfStatementFn, $endOfStatementStatic);
205205

206-
}//end testArrayFunctionEndOfStatement()
206+
}//end testArrowFunction()
207207

208208

209209
}//end class

0 commit comments

Comments
 (0)