Skip to content
PHP Ecosystem
Explore

StatusCommand

API reference › Scaffold › Console › Command › StatusCommand

final classPHPForge\Scaffold\Console\Command\StatusCommand
ExtendsAbstractScaffoldCommand » Symfony\Component\Console\Command\Command
Sourcesrc/Console/Command/StatusCommand.php

Displays the state of every scaffold-tracked file against the disk and the current provider stubs.

MethodDescriptionDefined by
configure() protectedDeclares the --format and --exit-code options.StatusCommand
execute() protected finalValidates the input, resolves the project root and runs AbstractScaffoldCommand::handle().AbstractScaffoldCommand
handle() protectedPrints the status of the tracked files.StatusCommand
validate() protectedReturns whether --format is table or json.StatusCommand
protected function configure(): void

Declares the --format and --exit-code options.

protected function handle(Symfony\Component\Console\Input\InputInterface $input, PHPForge\Scaffold\Console\SymfonyOutputWriter $out, string $projectRoot): int

Prints the status of the tracked files.

Parameters

ParameterTypeDescription
$inputSymfony\Component\Console\Input\InputInterfaceInput with the --format and --exit-code options.
$outPHPForge\Scaffold\Console\SymfonyOutputWriterOutput sink that receives the status table or JSON document and the error messages.
$projectRootstringAbsolute path of the project root.

Returns

int: Exit code of StatusService::run().

protected function validate(Symfony\Component\Console\Input\InputInterface $input, PHPForge\Scaffold\Console\SymfonyOutputWriter $out): bool

Returns whether --format is table or json.

Parameters

ParameterTypeDescription
$inputSymfony\Component\Console\Input\InputInterfaceInput with the --format option.
$outPHPForge\Scaffold\Console\SymfonyOutputWriterOutput sink that receives the error message.

Returns

bool: true when the format is known, false otherwise.