Skip to content

Commit e9629d8

Browse files
committed
Generic/InlineControlStructure: removed unnecessary code block
a495c2cc changed the sniff to bail early for all control structures without body, so the code will never reach the fixer if `$closer + 1` is `T_SEMICOLON` and thus the removed condition is not necessary anymore.
1 parent aa71bb7 commit e9629d8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ public function process(File $phpcsFile, $stackPtr)
168168
$closer = $stackPtr;
169169
}
170170

171-
if ($tokens[($closer + 1)]['code'] === T_WHITESPACE
172-
|| $tokens[($closer + 1)]['code'] === T_SEMICOLON
173-
) {
171+
if ($tokens[($closer + 1)]['code'] === T_WHITESPACE) {
174172
$phpcsFile->fixer->addContent($closer, ' {');
175173
} else {
176174
$phpcsFile->fixer->addContent($closer, ' { ');

0 commit comments

Comments
 (0)