diff --git a/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php b/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php index 1221bff..a60f9c0 100644 --- a/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php +++ b/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php @@ -171,7 +171,7 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S $content = $tokens[($return + 2)]['content']; if (empty($content) === true || $tokens[($return + 2)]['code'] !== T_DOC_COMMENT_STRING) { $error = 'Return type missing for @return tag in function comment'; - $phpcsFile->addError($error, $return, 'MissingReturnType'); + // $phpcsFile->addError($error, $return, 'MissingReturnType'); } else { // Check return type (can be multiple, separated by '|'). $typeNames = explode('|', $content); @@ -210,7 +210,7 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S $returnToken = $phpcsFile->findNext(T_RETURN, $stackPtr, $endToken); if ($returnToken === false) { $error = '@return doc comment specified, but function has no return statement'; - $phpcsFile->addError($error, $return, 'InvalidNoReturn'); + // $phpcsFile->addError($error, $return, 'InvalidNoReturn'); } else { $semicolon = $phpcsFile->findNext(T_WHITESPACE, ($returnToken + 1), null, true); if ($tokens[$semicolon]['code'] === T_SEMICOLON) { @@ -413,7 +413,7 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S if (isset($matches[2]) === false && $tokens[($tag + 2)]['content'] !== '...') { if ($tokens[($tag + 2)]['content'][0] === '$' || $tokens[($tag + 2)]['content'][0] === '&') { $error = 'Missing parameter type'; - $phpcsFile->addError($error, $tag, 'MissingParamType'); + // $phpcsFile->addError($error, $tag, 'MissingParamType'); } else { $error = 'Missing parameter name'; $phpcsFile->addError($error, $tag, 'MissingParamName'); @@ -421,7 +421,7 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S }//end if } else { $error = 'Missing parameter type'; - $phpcsFile->addError($error, $tag, 'MissingParamType'); + // $phpcsFile->addError($error, $tag, 'MissingParamType'); }//end if $params[] = array( @@ -504,7 +504,7 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S $suggestedTypeHint, $param['var'], ); - $phpcsFile->addError($error, $stackPtr, 'TypeHintMissing', $data); + // $phpcsFile->addError($error, $stackPtr, 'TypeHintMissing', $data); } else if ($typeHint !== $suggestedTypeHint) { // The type hint could be fully namespaced, so we check // for the part after the last "\". @@ -528,7 +528,7 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S $typeHint, $param['var'], ); - $phpcsFile->addError($error, $stackPtr, 'InvalidTypeHint', $data); + // $phpcsFile->addError($error, $stackPtr, 'InvalidTypeHint', $data); } }//end if }//end if