Permalink
Browse files

Minor changes for consistency + changelog updated

  • Loading branch information...
1 parent 1e63a53 commit f09d976100f90278e34587ff1fd48c49547abf2c @gsherwood gsherwood committed Oct 8, 2012
@@ -11,8 +11,9 @@
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
+
/**
- * Checks that before php opening tag is no other char like newline.
+ * Checks that the opening PHP tag is the first content in a file.
*
* @category PHP
* @package PHP_CodeSniffer
@@ -25,13 +26,6 @@
class Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff implements PHP_CodeSniffer_Sniff
{
- /**
- * A list of tokenizers this sniff supports
- *
- * @var array
- */
- public $supportedTokenizes = array('PHP');
-
/**
* Returns an array of tokens this test wants to listen for.
@@ -57,13 +51,13 @@ public function register()
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
{
if ($stackPtr > 0) {
- $error = 'The opening PHP tag must be the first content in the file.';
- $phpcsFile->addError($error, $stackPtr, 'NoCharacterBeforePHPOpeningTag');
+ $error = 'The opening PHP tag must be the first content in the file';
+ $phpcsFile->addError($error, $stackPtr, 'Found');
}
}//end process()
}//end class
-?>
+?>
@@ -7,12 +7,11 @@
* @category PHP
* @package PHP_CodeSniffer
* @author Andy Grunwald <andygrunwald@gmail.com>
- * @author Greg Sherwood <gsherwood@squiz.net>
- * @author Marc McIntyre <mmcintyre@squiz.net>
* @copyright 2010 Andy Grunwald
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
+
/**
* Unit test class for the CharacterBeforePHPOpeningTag sniff.
*
@@ -22,8 +21,6 @@
* @category PHP
* @package PHP_CodeSniffer
* @author Andy Grunwald <andygrunwald@gmail.com>
- * @author Greg Sherwood <gsherwood@squiz.net>
- * @author Marc McIntyre <mmcintyre@squiz.net>
* @copyright 2010 Andy Grunwald
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @version Release: @package_version@
@@ -68,4 +65,4 @@ public function getWarningList()
}//end class
-?>
+?>
View
@@ -37,6 +37,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
-- Thanks to Andy Grunwald for the contribution
- Added Generic ClosingPHPTagSniff to check that each open PHP tag has a corresponding close tag
-- Thanks to Andy Grunwald for the contribution
+ - Added Generic CharacterBeforePHPOpeningTagSniff to check that the open PHP tag is the first content in a file
+ -- Thanks to Andy Grunwald for the contribution
- Fixed incorrect errors in Squiz OperatorBracketSniff and OperatorSpacingSniff for negative numbers in CASE statements
-- Thanks to Arnout Boks for the patch
- Generic CamelCapsFunctionNameSniff no longer enforces exact case matching for PHP magic methods

0 comments on commit f09d976

Please sign in to comment.