| @@ 150-159 (lines=10) @@ | ||
| 147 | // multiple lines. |
|
| 148 | $shortContent = $tokens[$short]['content']; |
|
| 149 | $shortEnd = $short; |
|
| 150 | for ($i = ($short + 1); $i < $commentEnd; $i++) { |
|
| 151 | if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) { |
|
| 152 | if ($tokens[$i]['line'] === ($tokens[$shortEnd]['line'] + 1)) { |
|
| 153 | $shortContent .= $tokens[$i]['content']; |
|
| 154 | $shortEnd = $i; |
|
| 155 | } else { |
|
| 156 | break; |
|
| 157 | } |
|
| 158 | } |
|
| 159 | } |
|
| 160 | ||
| 161 | if (empty($tokens[$commentStart]['comment_tags']) === true) { |
|
| 162 | // No tags in the comment. |
|
| @@ 151-160 (lines=10) @@ | ||
| 148 | // multiple lines. |
|
| 149 | $shortContent = $tokens[$short]['content']; |
|
| 150 | $shortEnd = $short; |
|
| 151 | for ($i = ($short + 1); $i < $commentEnd; $i++) { |
|
| 152 | if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) { |
|
| 153 | if ($tokens[$i]['line'] === ($tokens[$shortEnd]['line'] + 1)) { |
|
| 154 | $shortContent .= $tokens[$i]['content']; |
|
| 155 | $shortEnd = $i; |
|
| 156 | } else { |
|
| 157 | break; |
|
| 158 | } |
|
| 159 | } |
|
| 160 | } |
|
| 161 | ||
| 162 | if (preg_match('/^\p{Ll}/u', $shortContent) === 1) { |
|
| 163 | $error = 'Doc comment short description must start with a capital letter'; |
|