diff options
| author | Manuel Pichler <mapi@phpundercontrol.org> | 2008-03-15 01:01:15 +0000 |
|---|---|---|
| committer | Manuel Pichler <mapi@phpundercontrol.org> | 2008-03-15 01:01:15 +0000 |
| commit | c34599126fe8a7d38b604ceb92136be6a6c89ee8 (patch) | |
| tree | cd9f879baf03e53d8c2118775bf48854c944955f /code_sniffer/Tests/Commenting/FileCommentUnitTest.php | |
| parent | 9b96e126789c6191ac3d99a70f53cbf0677f5a9b (diff) | |
| download | forums-c34599126fe8a7d38b604ceb92136be6a6c89ee8.tar forums-c34599126fe8a7d38b604ceb92136be6a6c89ee8.tar.gz forums-c34599126fe8a7d38b604ceb92136be6a6c89ee8.tar.bz2 forums-c34599126fe8a7d38b604ceb92136be6a6c89ee8.tar.xz forums-c34599126fe8a7d38b604ceb92136be6a6c89ee8.zip | |
- First PHP_CodeSniffer rule added that checks all files for a valid file doc
comment as specified in "1.ii. File Header" of the phpBB Coding Guidelines.
git-svn-id: file:///svn/phpbb/trunk@8435 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'code_sniffer/Tests/Commenting/FileCommentUnitTest.php')
| -rw-r--r-- | code_sniffer/Tests/Commenting/FileCommentUnitTest.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/code_sniffer/Tests/Commenting/FileCommentUnitTest.php b/code_sniffer/Tests/Commenting/FileCommentUnitTest.php new file mode 100644 index 0000000000..849a7fb9a0 --- /dev/null +++ b/code_sniffer/Tests/Commenting/FileCommentUnitTest.php @@ -0,0 +1,51 @@ +<?php +/** +* +* @package code_sniffer +* @version $Id: $ +* @copyright (c) 2007 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Unit test class for the EmptyStatement sniff. +* +* @package code_sniffer +* @author Manuel Pichler <mapi@phpundercontrol.org> +*/ +class phpbb_Tests_Commenting_FileCommentUnitTest extends AbstractSniffUnitTest +{ + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array(int => int) + */ + public function getErrorList() + { + return array( + 7 => 1 // BSD License error :) + ); + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array(int => int) + */ + public function getWarningList() + { + return array( + 4 => 1, + 8 => 1 + ); + }//end getWarningList() +}
\ No newline at end of file |
