Skip to content

Commit

Permalink
Changelog + unit test rename for #2748 (ref #2749)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Jan 6, 2020
1 parent a922594 commit f0ec2ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fixed bug #2688 : Case statements not tokenized correctly when switch is contained within ternary
- Fixed bug #2698 : PHPCS throws errors determining auto report width when shell_exec is disabled
-- Thanks to Matthew Peveler for the patch
- Fixed bug #2748 : Wrong end of statement for fn closures
-- Thanks to Michał Bundyra for the patch
- Fixed bug #2751 : Autoload relative paths first to avoid confusion with files from the global include path
-- Thanks to Klaus Purer for the patch
- Fixed bug #2768 : Generic.Files.LineLength false positive for non-breakable strings at exactly the soft limit
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/File/FindEndOfStatementTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $a = [
'b' => fn() => return 1,
];

/* testArrowFunctionEndOfStatement */
/* testArrowFunction */
static fn ($a) => $a;

return 0;
6 changes: 3 additions & 3 deletions tests/Core/File/FindEndOfStatementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,17 @@ public function testArrowFunctionArrayValue()
*
* @return void
*/
public function testArrayFunctionEndOfStatement()
public function testArrowFunction()
{
$static = (self::$phpcsFile->findNext(T_COMMENT, 0, null, false, '/* testArrowFunctionEndOfStatement */') + 2);
$static = (self::$phpcsFile->findNext(T_COMMENT, 0, null, false, '/* testArrowFunction */') + 2);
$fn = self::$phpcsFile->findNext(T_FN, ($static + 1));

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

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

}//end testArrayFunctionEndOfStatement()
}//end testArrowFunction()


}//end class

0 comments on commit f0ec2ab

Please sign in to comment.