Records an error against a specific line in the file.
public addErrorOnLine ( string $error, integer $line, string $code = '', array $data = [], integer $severity ) : boolean | ||
$error | string | The error message. |
$line | integer | The line on which the error occurred. |
$code | string | A violation code unique to the sniff message. |
$data | array | Replacements for the error message. |
$severity | integer | The severity level for this error. A value of 0 will be converted into the default severity level. |
return | boolean |