Korin API

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

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
string

jsonSerialize()

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}
On this page

Search results