Skip to content

Commit 18c5d6f

Browse files
committed
PEAR/FunctionDeclaration: minor efficiency tweak
1 parent 074622b commit 18c5d6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,14 @@ public function processArgumentList($phpcsFile, $stackPtr, $indent, $type='funct
460460
if ($tokens[$i]['code'] === T_WHITESPACE
461461
&& $tokens[$i]['line'] !== $tokens[($i + 1)]['line']
462462
) {
463-
// This is an empty line, so don't check the indent.
464-
$foundIndent = $expectedIndent;
465-
466463
$error = 'Blank lines are not allowed in a multi-line '.$type.' declaration';
467464
$fix = $phpcsFile->addFixableError($error, $i, 'EmptyLine');
468465
if ($fix === true) {
469466
$phpcsFile->fixer->replaceToken($i, '');
470467
}
468+
469+
// This is an empty line, so don't check the indent.
470+
continue;
471471
} else if ($tokens[$i]['code'] === T_WHITESPACE) {
472472
$foundIndent = $tokens[$i]['length'];
473473
} else if ($tokens[$i]['code'] === T_DOC_COMMENT_WHITESPACE) {

0 commit comments

Comments
 (0)