PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Download Installed Plugin
Download a WordPress plugin as a ZIP archive
Author: By
Last change:
Date: 2 days ago
Size: 663 bytes
 

Contents

Class file image Download
<documentation title="Doc Comment Throws Tag"> <standard> <![CDATA[ If a function throws any exceptions, they should be documented in a @throws tag. ]]> </standard> <code_comparison> <code title="Valid: @throws tag used."> <![CDATA[ /** * <em>@throws Exception all the time</em> * @return void */ function foo() { throw new Exception('Danger!'); } ]]> </code> <code title="Invalid: No @throws tag used for throwing function."> <![CDATA[ /** * @return void */ function foo() { throw new Exception('Danger!'); } ]]> </code> </code_comparison> </documentation>