Skip to content

Commit 58c6ac5

Browse files
authored
Backport Fixed bug squizlabs#1890
1 parent fed288d commit 58c6ac5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function register()
5959
T_ELSEIF,
6060
T_TRY,
6161
T_CATCH,
62+
T_FINALLY,
6263
);
6364

6465
}//end register()
@@ -301,6 +302,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
301302
} else if ($tokens[$trailingContent]['code'] !== T_ELSE
302303
&& $tokens[$trailingContent]['code'] !== T_ELSEIF
303304
&& $tokens[$trailingContent]['code'] !== T_CATCH
305+
&& $tokens[$trailingContent]['code'] !== T_FINALLY
304306
&& $tokens[$trailingContent]['line'] === ($tokens[$scopeCloser]['line'] + 1)
305307
) {
306308
$error = 'No blank line found after control structure';

0 commit comments

Comments
 (0)