cvs: pear /PHP_CodeSniffer package.xml /PHP_CodeSniffer/CodeSniffer File.php /PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting
OperatorBracketUnitTest.inc

From: Date: Fri, 16 Feb 2007 04:44:06 +0000
Subject: cvs: pear /PHP_CodeSniffer package.xml /PHP_CodeSniffer/CodeSniffer File.php /PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting
OperatorBracketUnitTest.inc
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44677@lists.php.net to get a copy of this message
squiz Fri Feb 16 04:44:06 2007 UTC Modified files: /pear/PHP_CodeSniffer package.xml /pear/PHP_CodeSniffer/CodeSniffer File.php /pear/PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting OperatorBracketUnitTest.inc Log: PHP_CodeSniffer_File::isReference() now returns correctly when checking refs on right side of => http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/package.xml?r1=1.33&r2=1.34&diff_format=u Index: pear/PHP_CodeSniffer/package.xml diff -u pear/PHP_CodeSniffer/package.xml:1.33 pear/PHP_CodeSniffer/package.xml:1.34 --- pear/PHP_CodeSniffer/package.xml:1.33 Fri Feb 16 04:29:51 2007 +++ pear/PHP_CodeSniffer/package.xml Fri Feb 16 04:44:06 2007 @@ -38,6 +38,7 @@ - Squiz FunctionCommentSniff now checks that param comments start with a captial letter and end with a full stop - Squiz FunctionSpacingSniff now reports incorrect lines below function on closing brace, not function keyword - Squiz FileCommentSniff now checks that there are no blank lines between the open PHP tag and the comment + - PHP_CodeSniffer_File::isReference() now returns correctly when checking refs on right side of => - Fixed incorrect error with switch closing brace in Squiz SwitchDeclarationSniff - Fixed missing error when multiple statements are not aligned correctly with object operators - Fixed incorrect errors for some PHP special variables in Squiz ValidVariableNameSniff http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer/File.php?r1=1.18&r2=1.19&diff_format=u Index: pear/PHP_CodeSniffer/CodeSniffer/File.php diff -u pear/PHP_CodeSniffer/CodeSniffer/File.php:1.18 pear/PHP_CodeSniffer/CodeSniffer/File.php:1.19 --- pear/PHP_CodeSniffer/CodeSniffer/File.php:1.18 Fri Jan 12 02:50:23 2007 +++ pear/PHP_CodeSniffer/CodeSniffer/File.php Fri Feb 16 04:44:06 2007 @@ -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.18 2007/01/12 02:50:23 squiz Exp $ + * @version CVS: $Id: File.php,v 1.19 2007/02/16 04:44:06 squiz Exp $ * @link http://pear.php.net/package/PHP_CodeSniffer */ @@ -1580,6 +1580,11 @@ $tokenBefore = $this->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($this->_tokens[$tokenBefore]['code'] === T_DOUBLE_ARROW) { + // Inside a foreach loop, this is a reference. + return true; + } + if ($this->_tokens[$tokenBefore]['code'] === T_AS) { // Inside a foreach loop, this is a reference. return true; http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc?r1=1.5&r2=1.6&diff_format=u Index: pear/PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc diff -u pear/PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc:1.5 pear/PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc:1.6 --- pear/PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc:1.5 Wed Jan 10 05:20:52 2007 +++ pear/PHP_CodeSniffer/CodeSniffer/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc Fri Feb 16 04:44:06 2007 @@ -89,4 +89,7 @@ while (($nextSpace = $phpcsFile->findNext(T_WHITESPACE, $nextSpace + 1, $nextBreak)) !== false) { } + +foreach ($attributes as $id => &$attribute) { +} ?>

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