cvs: pear /PHP_CodeSniffer package.xml /PHP_CodeSniffer/CodeSniffer File.php /PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions
ValidVariableNameUnitTest.inc

From: Date: Wed, 06 May 2009 06:40:30 +0000
Subject: cvs: pear /PHP_CodeSniffer package.xml /PHP_CodeSniffer/CodeSniffer File.php /PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions
ValidVariableNameUnitTest.inc
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-56048@lists.php.net to get a copy of this message
squiz Wed May 6 06:40:30 2009 UTC Modified files: /pear/PHP_CodeSniffer package.xml /pear/PHP_CodeSniffer/CodeSniffer File.php /pear/PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions ValidVariableNameUnitTest.inc Log: Fixed bug #16071 : Fatal error: Uncaught PHP_CodeSniffer_Exception. Needed to restore the ignore value when heading backwards in the token stack or we hit the same ignored tokens multiple times. http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/package.xml?r1=1.398&r2=1.399&diff_format=u Index: pear/PHP_CodeSniffer/package.xml diff -u pear/PHP_CodeSniffer/package.xml:1.398 pear/PHP_CodeSniffer/package.xml:1.399 --- pear/PHP_CodeSniffer/package.xml:1.398 Tue May 5 06:37:05 2009 +++ pear/PHP_CodeSniffer/package.xml Wed May 6 06:40:30 2009 @@ -37,6 +37,7 @@ -- Thanks to Dolly Aswin Harahap for the patch - Fixed bug #16001 : Notice triggered - Fixed bug #16054 : phpcs-svn-pre-commit not showing any errors + - Fixed bug #16071 : Fatal error: Uncaught PHP_CodeSniffer_Exception - Fixed bug #16170 : Undefined Offset -1 in MultiLineConditionSniff.php on line 68 - Fixed bug #16175 : Bug in Squiz-IncrementDecrementUsageSniff </notes> http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer/File.php?r1=1.83&r2=1.84&diff_format=u Index: pear/PHP_CodeSniffer/CodeSniffer/File.php diff -u pear/PHP_CodeSniffer/CodeSniffer/File.php:1.83 pear/PHP_CodeSniffer/CodeSniffer/File.php:1.84 --- pear/PHP_CodeSniffer/CodeSniffer/File.php:1.83 Tue May 5 05:52:49 2009 +++ pear/PHP_CodeSniffer/CodeSniffer/File.php Wed May 6 06:40:30 2009 @@ -11,7 +11,7 @@ * @author Marc McIntyre <mmcintyre@squiz.net> * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600) * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence - * @version CVS: $Id: File.php,v 1.83 2009/05/05 05:52:49 squiz Exp $ + * @version CVS: $Id: File.php,v 1.84 2009/05/06 06:40:30 squiz Exp $ * @link http://pear.php.net/package/PHP_CodeSniffer */ @@ -1105,6 +1105,11 @@ $currType = $tokens[$stackPtr]['code']; $startLine = $tokens[$stackPtr]['line']; + // We will need this to restore the value if we end up + // returning a token ID that causes our calling function to go back + // over already ignored braces. + $originalIgnore = $ignore; + // If the start token for this scope opener is the same as // the scope token, we have already found our opener. if ($currType === $tokenizer->scopeOpeners[$currType]['start']) { @@ -1271,6 +1276,9 @@ } if ($tokenizer->scopeOpeners[$tokens[$stackPtr]['code']]['shared'] === true) { + // As we are going back to where we started originally, restore + // the ignore value back to its original value. + $ignore = $originalIgnore; return $opener; } else { return $i; http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc?r1=1.5&r2=1.6&diff_format=u Index: pear/PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc diff -u pear/PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc:1.5 pear/PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc:1.6 --- pear/PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc:1.5 Fri Jun 20 03:33:58 2008 +++ pear/PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc Wed May 6 06:40:30 2009 @@ -57,4 +57,18 @@ '{$this->def["POP_{$cc}_B"]}')"; } } + +class mpgResponse{ + var $term_id; + var $currentTag; + function characterHandler($parser,$data){ + switch($this->currentTag) + { + case "term_id": { + $this->term_id=$data; + break; + } + } + }//end characterHandler +}//end class mpgResponse ?>

« previous php.pear.cvs (#56048) next »