Konafets / TYPO3SniffPool

This repository contains custom sniffs which are compatible with the PHP_CodeSniffer. Understand this package as a sniff pool which contains all needed custom sniffs for the various TYPO3 projects.
21 stars 10 forks source link

Control sniff for function doc block comments #32

Closed andygrunwald closed 9 years ago

andygrunwald commented 10 years ago

Lets check if the function doc block comments are checked as expected:

/**
 * @param[space]integer[space]$foo[space]Description
 */
function foo($foo){

}

Maybe PEAR.Commenting.ClassComment is a solution. Check Feature #9863: Reimplement PEAR.Commenting.ClassComment for details

Further more what about short / long types?

/**
 * Initializes the plugin.
 *
 * Checks the configuration and substitutes defaults for missing values.
 *
 * @param array $conf Plugin configuration from TypoScript
 * @return boolean TRUE if initialization was successful, FALSE otherwise 
 * @see tx_myext_class:anotherFunc()
 */
protected function initialize(array $conf) {
// Do something
}

Check Feature #38688: Create sniff for function / method doc comment long types for details

Lefaux commented 9 years ago

In regards to long or short types: we stick to short ones

Konafets commented 9 years ago

Fixed in https://github.com/typo3-ci/TYPO3SniffPool/commit/2120d4f1aa53aead3b8d4123d36f3b3ba51ad320