| 115 | | if (rtrim($content) !== '// @codeCoverageIgnoreStart') { |
|---|
| 116 | | if ($code === T_COMMENT) { |
|---|
| 117 | | $error = 'You must use "/**" style comments for a function comment'; |
|---|
| 118 | | $phpcsFile->addError($error, $stackPtr); |
|---|
| 119 | | return; |
|---|
| 120 | | } else if ($code !== T_DOC_COMMENT) { |
|---|
| 121 | | $phpcsFile->addError('Missing function doc comment', $stackPtr); |
|---|
| 122 | | return; |
|---|
| 123 | | } |
|---|
| | 115 | if (rtrim($content) === '// @codeCoverageIgnoreStart') { |
|---|
| | 116 | // take real T_DOC_COMMENT instead of T_COMMENT |
|---|
| | 117 | $commentEnd = $phpcsFile->findPrevious($find, ($commentEnd - 1)); |
|---|
| | 118 | $code = $tokens[$commentEnd]['code']; |
|---|
| | 119 | $content = $tokens[$commentEnd]['content']; |
|---|
| | 120 | } |
|---|
| | 121 | |
|---|
| | 122 | if ($code === T_COMMENT) { |
|---|
| | 123 | $error = 'You must use "/**" style comments for a function comment'; |
|---|
| | 124 | $phpcsFile->addError($error, $stackPtr); |
|---|
| | 125 | return; |
|---|
| | 126 | } else if ($code !== T_DOC_COMMENT) { |
|---|
| | 127 | $phpcsFile->addError('Missing function doc comment', $stackPtr); |
|---|
| | 128 | return; |
|---|