final class Application
Public API: explicitly declared with @visibility public.

The requirements command line: lint, check, coverage, spec and format.

Exit codes are 0 on success, 1 for a failed check, gate, verification or format check, and 2 for invalid configuration, options or any other error. With --json every outcome, errors included, is a JSON document on standard output.

Showing the overview when no command is givendoctest
(new \Requirements\Console\Application())->run(['--quiet']) // => 0
Rejecting an unknown commanddoctest
(new \Requirements\Console\Application())->run(['unknown', '--quiet']) // => 2

Methods§

public function run(list<string> $arguments): int

Runs one command.

Parameters

$argumentslist<string>The command-line arguments after the program name

Returns

int The exit code

Throws

JsonException When a JSON error message cannot be encoded
Test cases 2
Calls 15

Test cases 7§

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

Dedicated tests 2
Other tests reaching this symbol 5