Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RequireOneLineDocCommentSniff.php

function RequireOneLineDocCommentSniff::addError

Overrides AbstractRequireOneLineDocComment::addError

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Commenting/RequireOneLineDocCommentSniff.php, line 12

Class

RequireOneLineDocCommentSniff

Namespace

SlevomatCodingStandard\Sniffs\Commenting

Code

protected function addError(File $phpcsFile, int $docCommentStartPointer) : bool {
    $error = 'Found multi-line doc comment with single line content, use one-line doc comment instead.';
    return $phpcsFile->addFixableError($error, $docCommentStartPointer, self::CODE_MULTI_LINE_DOC_COMMENT);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal