cvs: pear /PHP_CodeSniffer package.xml /PHP_CodeSniffer/CodeSniffer/Standards AbstractVariableSniff.php

From: Date: Wed, 28 Feb 2007 05:18:48 +0000
Subject: cvs: pear /PHP_CodeSniffer package.xml /PHP_CodeSniffer/CodeSniffer/Standards AbstractVariableSniff.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44908@lists.php.net to get a copy of this message
squiz Wed Feb 28 05:18:48 2007 UTC Modified files: /pear/PHP_CodeSniffer package.xml /pear/PHP_CodeSniffer/CodeSniffer/Standards AbstractVariableSniff.php Log: Fixed undefined index error in AbstractVariableSniff for variables inside an interface function definition http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/package.xml?r1=1.36&r2=1.37&diff_format=u Index: pear/PHP_CodeSniffer/package.xml diff -u pear/PHP_CodeSniffer/package.xml:1.36 pear/PHP_CodeSniffer/package.xml:1.37 --- pear/PHP_CodeSniffer/package.xml:1.36 Thu Feb 22 22:55:05 2007 +++ pear/PHP_CodeSniffer/package.xml Wed Feb 28 05:18:47 2007 @@ -33,6 +33,7 @@ <license uri="http://matrix.squiz.net/developer/tools/php_cs/licence">BSD License</license> <notes> - Added MemberVarSpacingSniff to Squiz standard + - Fixed undefined index error in AbstractVariableSniff for variables inside an interface function definition </notes> <contents> <dir name="/"> http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer/Standards/AbstractVariableSniff.php?r1=1.6&r2=1.7&diff_format=u Index: pear/PHP_CodeSniffer/CodeSniffer/Standards/AbstractVariableSniff.php diff -u pear/PHP_CodeSniffer/CodeSniffer/Standards/AbstractVariableSniff.php:1.6 pear/PHP_CodeSniffer/CodeSniffer/Standards/AbstractVariableSniff.php:1.7 --- pear/PHP_CodeSniffer/CodeSniffer/Standards/AbstractVariableSniff.php:1.6 Thu Feb 22 22:52:55 2007 +++ pear/PHP_CodeSniffer/CodeSniffer/Standards/AbstractVariableSniff.php Wed Feb 28 05:18:48 2007 @@ -10,7 +10,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: AbstractVariableSniff.php,v 1.6 2007/02/22 22:52:55 squiz Exp $ + * @version CVS: $Id: AbstractVariableSniff.php,v 1.7 2007/02/28 05:18:48 squiz Exp $ * @link http://pear.php.net/package/PHP_CodeSniffer */ @@ -94,9 +94,9 @@ $methodProps = $phpcsFile->getMethodProperties($stackPtr); - // If the function is abstract, then set the end of the function - // to it's closing semicolon. - if ($methodProps['is_abstract'] === true) { + // If the function is abstract, or is in an interface, + // then set the end of the function to it's closing semicolon. + if ($methodProps['is_abstract'] === true || $tokens[$currScope]['code'] === T_INTERFACE) { $this->_endFunction = $phpcsFile->findNext(array(T_SEMICOLON), $stackPtr); } else { $this->_endFunction = $tokens[$stackPtr]['scope_closer'];

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