From 9499d54fa0aabdf12bbd74086027cc714eaf6d04 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 5 Feb 2020 01:15:36 +0100 Subject: [PATCH] Tokens: add `T_FN` to `$parenthesisOpeners` array While as per [@gsherwood's comment](https://github.com/squizlabs/PHP_CodeSniffer/issues/2523#issuecomment-552235605) in 2523, arrow functions are not set up as scope openers, I think adding them to the `Tokens::$parenthesisOpeners` array would be justified. I'm also wondering if the token should be added to the `Tokens::$weightings` array ? --- src/Util/Tokens.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Util/Tokens.php b/src/Util/Tokens.php index d11b193629..94b9fd354e 100644 --- a/src/Util/Tokens.php +++ b/src/Util/Tokens.php @@ -362,6 +362,7 @@ final class Tokens T_ELSEIF => T_ELSEIF, T_CATCH => T_CATCH, T_DECLARE => T_DECLARE, + T_FN => T_FN, ]; /**