Skip to content

Commit eb081e0

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 2e875e7 commit eb081e0

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
@@ -165,9 +165,7 @@ public function process(File $phpcsFile, $stackPtr)
165165
$closer = $stackPtr;
166166
}
167167

168-
if ($tokens[($closer + 1)]['code'] === T_WHITESPACE
169-
|| $tokens[($closer + 1)]['code'] === T_SEMICOLON
170-
) {
168+
if ($tokens[($closer + 1)]['code'] === T_WHITESPACE) {
171169
$phpcsFile->fixer->addContent($closer, ' {');
172170
} else {
173171
$phpcsFile->fixer->addContent($closer, ' { ');

0 commit comments

Comments
 (0)