Diagnostic
in package
implements
Stringable, JsonSerializable
Read onlyYes
FinalYes
A problem found while reading or validating. Codes are stable within a major version and documented in docs/diagnostics.md. Messages never quote more than a short fragment of the file: trees hold personal data and diagnostics end up in logs.
Table of Contents
Interfaces
- Stringable
- JsonSerializable
Properties
- $code : string
- $line : int|null
- $message : string
- $path : string|null
- $reference : string|null
- $severity : Severity
Methods
- __construct() : mixed
- __toString() : string
- jsonSerialize() : array{code: string, severity: string, message: string, line: ?int, path: ?string, reference: ?string}
- withSeverity() : self
Properties
$code
public
string
$code
$line
public
int|null
$line
= null
$message
public
string
$message
$path
public
string|null
$path
= null
$reference
public
string|null
$reference
= null
$severity
public
Severity
$severity
Methods
__construct()
public
__construct(string $code, Severity $severity, string $message[, int|null $line = null ][, string|null $path = null ][, string|null $reference = null ]) : mixed
Parameters
- $code : string
- $severity : Severity
- $message : string
- $line : int|null = null
- $path : string|null = null
-
tree path in the corpus grammar, e.g. "@I1@/BIRT/DATE"
- $reference : string|null = null
-
the specification term or section the rule comes from
__toString()
public
__toString() : string
Return values
stringjsonSerialize()
public
jsonSerialize() : array{code: string, severity: string, message: string, line: ?int, path: ?string, reference: ?string}
Return values
array{code: string, severity: string, message: string, line: ?int, path: ?string, reference: ?string}withSeverity()
public
withSeverity(Severity $severity) : self
Parameters
- $severity : Severity