We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 85c3301 + 511b265 commit 4a30521Copy full SHA for 4a30521
PHPCSUtils/Utils/ControlStructures.php
@@ -78,7 +78,7 @@ public static function hasBody(File $phpcsFile, $stackPtr, $allowEmpty = true)
78
79
// Check whether the body is empty.
80
$start = ($tokens[$stackPtr]['scope_opener'] + 1);
81
- $end = ($phpcsFile->numTokens + 1);
+ $end = $phpcsFile->numTokens;
82
if (isset($tokens[$stackPtr]['scope_closer']) === true) {
83
$end = $tokens[$stackPtr]['scope_closer'];
84
}
0 commit comments