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
Namespace
PHP_CodeSniffer\FilesCode
public function addErrorOnLine($error, $line, $code, $data = [], $severity = 0) {
return $this->addMessage(true, $error, $line, 1, $code, $data, $severity, false);
}