From 1e26c730df438d8739ab9a209a2b3806450bbef1 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 11 Aug 2023 02:17:40 +0200 Subject: [PATCH] PSR2/ControlStructureSpacing: don't listen for `T_ELSE` No functional changes. This sniff only concerns itself with control structures which take parentheses, so listening for `T_ELSE` is unnecessary as the sniff will never do anything for that token (it bows out on no 'parenthesis_opener'/'parenthesis_closer' found). --- .../Sniffs/ControlStructures/ControlStructureSpacingSniff.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php b/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php index 09d2c14a07..00e7479394 100644 --- a/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php +++ b/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php @@ -44,7 +44,6 @@ public function register() T_FOREACH, T_FOR, T_SWITCH, - T_ELSE, T_ELSEIF, T_CATCH, T_MATCH,