FormatterManager
in package
Manages one or more formatters as a single formatter.
Tags
Table of Contents
Properties
- $outputFormatters : array<string|int, mixed>
Methods
- __construct() : mixed
- Constructor for FormatterManager.
- endLinting() : void
- printFatalError() : void
- Prints a fatal error message for the given source.
- printLintError() : void
- startLinting() : void
Properties
$outputFormatters read-only
private
array<string|int, mixed>
$outputFormatters
Methods
__construct()
Constructor for FormatterManager.
public
__construct(OutputFormatters $outputFormatters) : mixed
Parameters
- $outputFormatters : OutputFormatters
-
List of output formatters tuples to manage.
endLinting()
public
endLinting(string $source, bool $isValid) : void
Parameters
- $source : string
- $isValid : bool
printFatalError()
Prints a fatal error message for the given source.
public
printFatalError(string|null $source, Throwable|string $error) : void
Parameters
- $source : string|null
-
The source being linted (e.g., "CSS file "..."").
- $error : Throwable|string
-
The exception or error that occurred, which may include a message and stack trace.
printLintError()
public
printLintError(string $source, LintError $error) : void
Parameters
- $source : string
- $error : LintError
startLinting()
public
startLinting(string $source) : void
Parameters
- $source : string