PlainFormatter
in package
implements
FormatterInterface
Plain text formatter implementation.
Table of Contents
Interfaces
Methods
- endLinting() : string
- End linting a source file.
- getName() : non-empty-string
- Returns the name used to select this formatter (e.g., 'plain', 'json').
- printFatalError() : string
- Output a fatal error message.
- printLintError() : string
- Output a parsing or runtime error message.
- startLinting() : string
- Start linting a source file.
Methods
endLinting()
End linting a source file.
public
endLinting(string $source, bool $isValid) : string
Parameters
- $source : string
-
The source being linted (e.g., "CSS file "..."").
- $isValid : bool
-
Whether the source is valid CSS.
Return values
stringgetName()
Returns the name used to select this formatter (e.g., 'plain', 'json').
public
getName() : non-empty-string
Return values
non-empty-stringprintFatalError()
Output a fatal error message.
public
printFatalError(string|null $source, mixed $error) : string
Parameters
- $source : string|null
-
The source being linted (e.g., "CSS file "..."").
- $error : mixed
-
The exception or error that occurred, which may include a message and stack trace.
Return values
stringprintLintError()
Output a parsing or runtime error message.
public
printLintError(string $source, LintError $lintError) : string
Parameters
- $source : string
-
The source being linted (e.g., "CSS file "..."").
- $lintError : LintError
Return values
stringstartLinting()
Start linting a source file.
public
startLinting(string $source) : string
Parameters
- $source : string
-
The source being linted (e.g., "CSS file "..."").