Permalink
Browse files

Fixed bug #20308 : Squiz.ValidVariableNameSniff - wrong variable usage

  • Loading branch information...
1 parent 07c51b1 commit fc9ddddc6cb662389acf567aa5935e312de0348f @gsherwood gsherwood committed Jun 24, 2014
Showing with 2 additions and 1 deletion.
  1. +1 −1 CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php
  2. +1 −0 package.xml
@@ -84,7 +84,7 @@ protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
// Check to see if we are using a variable from an object.
$var = $phpcsFile->findNext(array(T_WHITESPACE), ($objOperator + 1), null, true);
if ($tokens[$var]['code'] === T_STRING) {
- $bracket = $objOperator = $phpcsFile->findNext(array(T_WHITESPACE), ($var + 1), null, true);
+ $bracket = $phpcsFile->findNext(array(T_WHITESPACE), ($var + 1), null, true);
if ($tokens[$bracket]['code'] !== T_OPEN_PARENTHESIS) {
$objVarName = $tokens[$var]['content'];
View
@@ -37,6 +37,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fixed bug #20268 : Incorrect documentation titles in PEAR documentation
- Fixed bug #20296 : new array notion in function comma check fails
- Fixed bug #20307 : PHP_CodeSniffer_Standards_AbstractVariableSniff analyze traits
+ - Fixed bug #20308 : Squiz.ValidVariableNameSniff - wrong variable usage
- Fixed bug #20309 : Use "member variable" term in sniff "processMemberVar" method
- Fixed bug #20310 : PSR2 does not check for space after function name
</notes>

0 comments on commit fc9dddd

Please sign in to comment.