|
@@ 181-184 (lines=4) @@
|
| 178 |
|
$prev = $phpcsFile->findPrevious($empty, $commentEnd - 1, $stackPtr, true); |
| 179 |
|
|
| 180 |
|
// Check for additional blank lines at the end of the comment. |
| 181 |
|
if ($tokens[$prev]['line'] < ($tokens[$commentEnd]['line'] - 1)) { |
| 182 |
|
$error = self::MESSAGE_SPACING_AFTER; |
| 183 |
|
$phpcsFile->addError($error, $commentEnd, self::CODE_SPACING_AFTER); |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
// Check for a comment description. |
| 187 |
|
if ($tokens[$short]['code'] !== T_DOC_COMMENT_STRING |
|
@@ 220-223 (lines=4) @@
|
| 217 |
|
|
| 218 |
|
$long = $phpcsFile->findNext($empty, $shortEnd + 1, $commentEnd - 1, true); |
| 219 |
|
if ($long !== false && $tokens[$long]['code'] === T_DOC_COMMENT_STRING) { |
| 220 |
|
if ($tokens[$long]['line'] !== ($tokens[$shortEnd]['line'] + 2)) { |
| 221 |
|
$error = self::MESSAGE_SPACING_BETWEEN; |
| 222 |
|
$phpcsFile->addError($error, $long, self::CODE_SPACING_BETWEEN); |
| 223 |
|
} |
| 224 |
|
|
| 225 |
|
if (preg_match('/^\p{Ll}/u', $tokens[$long]['content']) === 1) { |
| 226 |
|
$error = self::MESSAGE_LONG_NOT_CAPITAL; |