classApplication
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.
(new \Requirements\Console\Application())->run(['--quiet']) // => 0(new \Requirements\Console\Application())->run(['unknown', '--quiet']) // => 2Methods§
public function run(list<string> $arguments): intRuns one command.
Parameters
$arguments | list<string> | The command-line arguments after the program name |
Returns
int The exit codeThrows
JsonException When a JSON error message cannot be encodedTest cases 2
Calls 15
- new
ArgvInputline 42 - new
ConsoleOutputline 43 - method-call CommandLine::create() line 45
- new CommandLine line 45
- new Overview line 46
- method-call Overview::requested() line 47
- method-call Overview::show() line 48
- function-call
in_arrayline 53 - method-call
ConsoleOutput::writeln()line 54 - function-call
json_encodeline 54 - class-const
OutputInterface::OUTPUT_RAW()line 54 - method-call
SymfonyStyle::error()line 56 - new
SymfonyStyleline 56 - method-call
ConsoleOutput::getErrorOutput()line 56 - static-call
OutputFormatter::escape()line 56
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
CommandsTestcallsExtensionCommandTestcallsMarkdownCommandTestcallsSpecCommandTestcallsSpecPolicyTestcalls