Skip to content

DocsCommand

github-actions edited this page Apr 22, 2026 · 1 revision

Generates the package API documentation through phpDocumentor.

The command prepares a temporary phpDocumentor configuration from the current package metadata, then delegates execution to the shared process queue so logging and grouped output stay consistent with the rest of the command surface.


Methods

__construct

Creates a new DocsCommand instance.

public __construct(\FastForward\DevTools\Process\ProcessBuilderInterface $processBuilder, \FastForward\DevTools\Process\ProcessQueueInterface $processQueue, \Twig\Environment $renderer, \FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \FastForward\DevTools\Composer\Json\ComposerJsonInterface $composer, \Psr\Log\LoggerInterface $logger): mixed

Parameters:

Parameter Type Description
$processBuilder \FastForward\DevTools\Process\ProcessBuilderInterface the process builder for executing phpDocumentor
$processQueue \FastForward\DevTools\Process\ProcessQueueInterface the process queue for managing execution
$renderer \Twig\Environment
$filesystem \FastForward\DevTools\Filesystem\FilesystemInterface the filesystem for handling file operations
$composer \FastForward\DevTools\Composer\Json\ComposerJsonInterface the composer.json handler for accessing project metadata
$logger \Psr\Log\LoggerInterface the output-aware logger

configure

Configures the command options used to generate API documentation.

protected configure(): void

execute

Generates the HTML API documentation for the configured source tree.

protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): int

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface the input details for the command
$output \Symfony\Component\Console\Output\OutputInterface the output mechanism for logging

Return Value:

the final execution status code


Inherited methods

addJsonOption

Adds the standard JSON output options to the current command.

protected addJsonOption(): static

isJsonOutput

Determines whether JSON output was requested.

protected isJsonOutput(\Symfony\Component\Console\Input\InputInterface $input): bool

The pretty-json flag SHALL imply JSON output.

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface

isPrettyJsonOutput

Determines whether pretty JSON output was requested.

protected isPrettyJsonOutput(\Symfony\Component\Console\Input\InputInterface $input): bool

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface

Clone this wiki locally