final class CommandHandler

Runs one command: loads the project, executes the command and reports the result.

Methods§

public function __construct(private string $command)

Parameters

$commandstringThe command name
public function __invoke(InputInterface $input, OutputInterface $output): int

Runs the command.

Parameters

$inputInputInterfaceThe parsed command line
$outputOutputInterfaceReceives the JSON report or the terminal tables

Returns

int 0 when the report passed, 1 otherwise

Throws

InvalidInputException When the configuration, a definition or an option is invalid
JsonException When a document or the report cannot be encoded
RuntimeException When a file cannot be written or read
Calls 10

Private surface 1§

Implementation details, listed for orientation only.

private string $command

Test cases 13§

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

Dedicated tests 6
Other tests reaching this symbol 7

Relations§

Instantiated in 1