final class Formatter

Rewrites configuration and definition documents in their canonical form.

Methods§

public function format(
    list<string> $files,
    bool $check,
    array<string, mixed> $markdown = [],
): list<string>

Formats documents, or only reports which would change.

Parameters

$fileslist<string>The configuration file followed by the definition files
$checkboolWhether to leave the files unchanged
$markdownarray<string, mixed>The markdown options

Returns

list<string> The files whose text differs from the canonical form

Throws

InvalidInputException When a document is invalid
JsonException When a document cannot be converted
RuntimeException When a file cannot be written
Test cases 13
Called from 1
Calls 8

Test cases 15§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 8
Other tests reaching this symbol 7

Relations§

Instantiated in 1
Method calls 1