@@ 332-346 (lines=15) @@ | ||
329 | * |
|
330 | * @return void |
|
331 | */ |
|
332 | private function addFixableMuchLinesBeforeCommentError(array $whitespacePtrs, bool $hasPrevCurlyBrace): void |
|
333 | { |
|
334 | $fixMuchLines = $this->phpcsFile->addFixableError( |
|
335 | self::MESSAGE_MANY_LINES_BEFORE_COMMENT, |
|
336 | $this->commentStartPtr, |
|
337 | self::CODE_MANY_LINES_BEFORE_COMMENT |
|
338 | ); |
|
339 | ||
340 | if ($fixMuchLines) { |
|
341 | $this->fixMuchLinesBeforeComment( |
|
342 | $whitespacePtrs, |
|
343 | $hasPrevCurlyBrace |
|
344 | ); |
|
345 | } |
|
346 | } |
|
347 | ||
348 | /** |
|
349 | * Adds the fixable no line before comment error. |
|
@@ 353-364 (lines=12) @@ | ||
350 | * |
|
351 | * @return void |
|
352 | */ |
|
353 | private function addFixableNoLineBeforeCommentError(): void |
|
354 | { |
|
355 | $fixNoLine = $this->phpcsFile->addFixableError( |
|
356 | self::MESSAGE_NO_LINE_BEFORE_COMMENT, |
|
357 | $this->commentStartPtr, |
|
358 | self::CODE_NO_LINE_BEFORE_COMMENT |
|
359 | ); |
|
360 | ||
361 | if ($fixNoLine) { |
|
362 | $this->fixNoLineBeforeComment(); |
|
363 | } |
|
364 | } |
|
365 | } |
|
366 |