StatusCommand
API reference › Scaffold › Console › Command › StatusCommand
Displays the state of every scaffold-tracked file against the disk and the current provider stubs.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
configure() protected | Declares the --format and --exit-code options. | StatusCommand |
execute() protected final | Validates the input, resolves the project root and runs AbstractScaffoldCommand::handle(). | AbstractScaffoldCommand |
handle() protected | Prints the status of the tracked files. | StatusCommand |
validate() protected | Returns whether --format is table or json. | StatusCommand |
Method details
Section titled “Method details”configure()
Section titled “configure() ”protected function configure(): voidDeclares the --format and --exit-code options.
handle()
Section titled “handle() ”protected function handle(Symfony\Component\Console\Input\InputInterface $input, PHPForge\Scaffold\Console\SymfonyOutputWriter $out, string $projectRoot): intPrints the status of the tracked files.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Symfony\ | Input with the --format and --exit-code options. |
$out | PHPForge\ | Output sink that receives the status table or JSON document and the error messages. |
$projectRoot | string | Absolute path of the project root. |
Returns
int: Exit code of StatusService::run().
validate()
Section titled “validate() ”protected function validate(Symfony\Component\Console\Input\InputInterface $input, PHPForge\Scaffold\Console\SymfonyOutputWriter $out): boolReturns whether --format is table or json.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Symfony\ | Input with the --format option. |
$out | PHPForge\ | Output sink that receives the error message. |
Returns
bool: true when the format is known, false otherwise.