Menu

[r311]: / trunk / test / bad_comments_6.php  Maximize  Restore  History

Download this file

21 lines (13 with data), 647 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<?php
// This file is an exemple of PHP file containing bad comments.
// This file should generate 6 warnings with the default config.
# 1 - C style comment : noShellComments :: PHPCHECKSTYLE_NO_SHELL_COMMENTS
class Comments { // 2 - Class docBlocks
// 3 - docBlocks : No docblock :: PHPCHECKSTYLE_MISSING_DOCBLOCK
function testComment($a) { // 4 - docBlocks : testParam :: PHPCHECKSTYLE_DOCBLOCK_PARAM
if ($a == null) {
throw new exception('$a is null'); // 5 - docBlocks : testThrow :: PHPCHECKSTYLE_DOCBLOCK_THROW
}
return $a; // 6 - docBlocks : testThrow :: PHPCHECKSTYLE_DOCBLOCK_RETURN
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.