Documentation

GithubActionsFormatter
in package
implements FormatterInterface

Formatter for GitHub Actions annotations.

Tags
phpstan-type

AnnotationProperties array{title?: string|null, file?: string|null, col?: int|null, endColumn?: int|null, line?: int|null, endLine?: int|null}

Table of Contents

Interfaces

FormatterInterface

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.
printAnnotation()  : string
sanitizeAnnotationProperties()  : string
sanitizeAnnotationProperty()  : string

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
string

getName()

Returns the name used to select this formatter (e.g., 'plain', 'json').

public getName() : non-empty-string
Return values
non-empty-string

printFatalError()

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
string

printLintError()

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
string

startLinting()

Start linting a source file.

public startLinting(string $source) : string
Parameters
$source : string

The source being linted (e.g., "CSS file "..."").

Return values
string

printAnnotation()

private printAnnotation(AnnotationType $type, string $message[, AnnotationProperties $annotationProperties = [] ]) : string
Parameters
$type : AnnotationType
$message : string
$annotationProperties : AnnotationProperties = []
Return values
string

sanitizeAnnotationProperties()

private sanitizeAnnotationProperties(AnnotationProperties $annotationProperties) : string
Parameters
$annotationProperties : AnnotationProperties
Return values
string

sanitizeAnnotationProperty()

private sanitizeAnnotationProperty(string|int|null $value) : string
Parameters
$value : string|int|null
Return values
string

        
On this page

Search results