@@ 126-143 (lines=18) @@ | ||
123 | * |
|
124 | * @return void |
|
125 | */ |
|
126 | private function checkSummaryCapitalLetter(array $summaryToken, int $summaryPtr): void |
|
127 | { |
|
128 | $summaryText = $summaryToken['content']; |
|
129 | ||
130 | if (ucfirst($summaryText) === $summaryText) { |
|
131 | return; |
|
132 | } |
|
133 | ||
134 | $fixUcFirst = $this->file->addFixableError( |
|
135 | AbstractDocSniff::MESSAGE_SUMMARY_UC_FIRST, |
|
136 | $summaryPtr, |
|
137 | AbstractDocSniff::CODE_SUMMARY_UC_FIRST |
|
138 | ); |
|
139 | ||
140 | if ($fixUcFirst) { |
|
141 | $this->fixSummaryUcFirst($summaryToken, $summaryPtr); |
|
142 | } |
|
143 | } |
|
144 | ||
145 | /** |
|
146 | * Checks if the line length of the summary is maximum 120 chars. |
@@ 411-427 (lines=17) @@ | ||
408 | * |
|
409 | * @return void |
|
410 | */ |
|
411 | private function addMuchLinesAfterTagError(int $lastTagPtr, array $lastTagToken, array $tagToken): void |
|
412 | { |
|
413 | $lastTagName = $lastTagToken['content']; |
|
414 | ||
415 | $fixMuchLines = $this->file->addFixableError( |
|
416 | AbstractDocSniff::MESSAGE_MUCH_LINES_AFTER_TAG, |
|
417 | $lastTagPtr, |
|
418 | AbstractDocSniff::CODE_MUCH_LINES_AFTER_TAG, |
|
419 | [ |
|
420 | $lastTagName |
|
421 | ] |
|
422 | ); |
|
423 | ||
424 | if ($fixMuchLines) { |
|
425 | $this->fixMuchLinesAfterTag($lastTagToken, $tagToken); |
|
426 | } |
|
427 | } |
|
428 | ||
429 | /** |
|
430 | * Validates the given comment tags. |