Skip to content
Corex

ModeCommandResult

Corex\Cli\Commands\ModeCommandResult · class · CLI layer

What wp corex mode has to say, without WP-CLI: whether it succeeded, the mode the site is in afterwards, and the sentence to print. Tests read this; {@see ModeCommand::run()} prints it.

__construct(bool $ok, string $mode, string $message)

Section titled “__construct(bool $ok, string $mode, string $message)”

A deploy script reads the exit code, not the sentence: anything that left the site in a mode other than the one asked for is a failure.