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

Breadcrumb

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

function File::addErrorOnLine

Records an error against a specific line in the file.

Parameters

string $error The error message.:

int $line The line on which the error occurred.:

string $code A violation code unique to the sniff message.:

array $data Replacements for the error message.:

int $severity The severity level for this error. A value of 0: will be converted into the default severity level.

Return value

boolean

File

vendor/squizlabs/php_codesniffer/src/Files/File.php, line 752

Class

File

Namespace

PHP_CodeSniffer\Files

Code

public function addErrorOnLine($error, $line, $code, $data = [], $severity = 0) {
    return $this->addMessage(true, $error, $line, 1, $code, $data, $severity, false);
}
RSS feed
Powered by Drupal