diff -u b/coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php b/coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php --- b/coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php +++ b/coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php @@ -969,7 +969,7 @@ $tokens = $phpcsFile->getTokens(); if (($openPtr = $this->findContainingBrackets($phpcsFile, $stackPtr)) !== false) { - // First non-whitespace thing and see if it's a T_STRING function name + // First non-whitespace thing and see if it's a T_STRING function name. $functionPtr = $phpcsFile->findPrevious( T_WHITESPACE, ($openPtr - 1), @@ -1169,7 +1169,7 @@ && ($tokens[$catchPtr]['code'] === T_CATCH) ) { // Scope of the exception var is actually the function, not just the catch block. - // TODO: typeHint + // TODO: typeHint. $this->markVariableDeclaration($varName, 'local', null, $stackPtr, $currScope, true); $this->markVariableAssignment($varName, $stackPtr, $currScope); if ($this->allowUnusedCaughtExceptions !== false) { @@ -1283,7 +1283,7 @@ if (empty($token['conditions']) === false) { foreach (array_reverse($token['conditions'], true) as $scopePtr => $scopeCode) { - // self within a closure is invalid + // Self within a closure is invalid. // Note: have to fetch code from $tokens, T_CLOSURE isn't set for conditions codes. if ($tokens[$scopePtr]['code'] === T_CLOSURE) { $phpcsFile->addError(