REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 4.52 KB
Close
/opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml
Text
Base64
<documentation title="Function Comments"> <standard> <![CDATA[ Functions must have a non-empty doc comment. The short description must be on the second line of the comment. Each description must have one blank comment line before and after. There must be one blank line before the tags in the comments. There must be a tag for each of the parameters in the right order with the right variable names with a comment. There must be a return tag. Any throw tag must have an exception class. ]]> </standard> <code_comparison> <code title="Valid: A function doc comment is used."> <![CDATA[ <em>/** * Short description here. * * @return void */</em> function foo() { } ]]> </code> <code title="Invalid: No doc comment for the function."> <![CDATA[ function foo() { } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Short description is the second line of the comment."> <![CDATA[ /** * <em>Short description here.</em> * * @return void */ function foo() { } ]]> </code> <code title="Invalid: An extra blank line before the short description."> <![CDATA[ /** * <em></em> * <em>Short description here.</em> * * @return void */ function foo() { } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Exactly one blank line around descriptions."> <![CDATA[ /** * Short description here. * <em></em> * Long description here. * <em></em> * @return void */ function foo() { } ]]> </code> <code title="Invalid: Extra blank lines around the descriptions."> <![CDATA[ /** * Short description here. * <em></em> * <em></em> * Long description here. * <em></em> * <em></em> * @return void */ function foo() { } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Exactly one blank line before the tags."> <![CDATA[ /** * Short description here. * * Long description here. * <em></em> * @return void */ function foo() { } ]]> </code> <code title="Invalid: Extra blank lines before the tags."> <![CDATA[ /** * Short description here. * * Long description here. * <em></em> * <em></em> * @return void */ function foo() { } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Throws tag has an exception class."> <![CDATA[ /** * Short description here. * * @return void * @throws <em>FooException</em> */ function foo() { } ]]> </code> <code title="Invalid: No exception class given for throws tag."> <![CDATA[ /** * Short description here. * * @return void * <em>@throws</em> */ function foo() { } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Return tag present."> <![CDATA[ /** * Short description here. * * <em>@return void</em> */ function foo() { } ]]> </code> <code title="Invalid: No return tag."> <![CDATA[ /** * Short description here. */ function foo() { } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Param names are correct."> <![CDATA[ /** * Short description here. * * @param string <em>$foo</em> Foo parameter * @param string <em>$bar</em> Bar parameter * @return void */ function foo(<em>$foo</em>, <em>$bar</em>) { } ]]> </code> <code title="Invalid: Wrong parameter name doesn't match function signature."> <![CDATA[ /** * Short description here. * * @param string $foo Foo parameter * @param string <em>$qux</em> Bar parameter * @return void */ function foo($foo, <em>$bar</em>) { } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Param names are ordered correctly."> <![CDATA[ /** * Short description here. * * @param string <em>$foo</em> Foo parameter * @param string <em>$bar</em> Bar parameter * @return void */ function foo(<em>$foo</em>, <em>$bar</em>) { } ]]> </code> <code title="Invalid: Wrong parameter order."> <![CDATA[ /** * Short description here. * * @param string <em>$bar</em> Bar parameter * @param string <em>$foo</em> Foo parameter * @return void */ function foo(<em>$foo</em>, <em>$bar</em>) { } ]]> </code> </code_comparison> </documentation>
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ClassCommentStandard.xml
3.18 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FileCommentStandard.xml
6.46 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FunctionCommentStandard.xml
4.52 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InlineCommentStandard.xml
436 B
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).