Skip to content
On this page

FunctionComment

Parses and verifies the doc comments for functions.

Scope

Squiz.Commenting.FunctionComment

Properties

Property NameTypeDefaultAvailable Since
minimumVisibilitystringprivate3.6.0
skipIfInheritdocboolfalse3.6.0
specialMethodsarray[__construct,__destruct]3.6.0

Usage

xml
/**
 * {@inheritDoc}
 */
public function foo($a, $b) {}

Examples

Example 1

Valid: Asterisks are aligned.

php
/**
 * @see foo()
 */

Invalid: Asterisks are not aligned.

php
/**
  * @see foo()
*/

Example 2

Valid: One space between asterisk and tag.

php
/**
 * @see foo()
 */

Invalid: Incorrect spacing used.

php
/**
 *  @see foo()
 */

Released under the MIT License.