Skip to content

Commit 4a30521

Browse files
authored
Merge pull request #613 from PHPCSStandards/feature/controlstructures-minor-simplification
ControlStructures::hasBody(): minor simplification
2 parents 85c3301 + 511b265 commit 4a30521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PHPCSUtils/Utils/ControlStructures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static function hasBody(File $phpcsFile, $stackPtr, $allowEmpty = true)
7878

7979
// Check whether the body is empty.
8080
$start = ($tokens[$stackPtr]['scope_opener'] + 1);
81-
$end = ($phpcsFile->numTokens + 1);
81+
$end = $phpcsFile->numTokens;
8282
if (isset($tokens[$stackPtr]['scope_closer']) === true) {
8383
$end = $tokens[$stackPtr]['scope_closer'];
8484
}

0 commit comments

Comments
 (0)