-
-
Notifications
You must be signed in to change notification settings - Fork 0
PhpDocCommand
github-actions edited this page Apr 19, 2026
·
1 revision
Provides operations to inspect, lint, and repair PHPDoc comments across the project.
The class MUST NOT be extended and SHALL coordinate tools like PHP-CS-Fixer and Rector.
- Full name:
\FastForward\DevTools\Console\Command\PhpDocCommand - Parent class:
BaseCommand - This class is marked as final and can't be subclassed
- This class is a Final class
| Constant | Visibility | Type | Value |
|---|---|---|---|
FILENAME |
public | string | '.docheader' |
CONFIG |
public | string | '.php-cs-fixer.dist.php' |
CACHE_FILE |
public | string | '.php-cs-fixer.cache' |
Creates a new PhpDocCommand instance.
public __construct(\FastForward\DevTools\Process\ProcessBuilderInterface $processBuilder, \FastForward\DevTools\Process\ProcessQueueInterface $processQueue, \FastForward\DevTools\Composer\Json\ComposerJsonInterface $composer, \Symfony\Component\Config\FileLocatorInterface $fileLocator, \FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \Twig\Environment $renderer, \Psr\Clock\ClockInterface $clock): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$processBuilder |
\FastForward\DevTools\Process\ProcessBuilderInterface | |
$processQueue |
\FastForward\DevTools\Process\ProcessQueueInterface | |
$composer |
\FastForward\DevTools\Composer\Json\ComposerJsonInterface | |
$fileLocator |
\Symfony\Component\Config\FileLocatorInterface | the locator for template resources |
$filesystem |
\FastForward\DevTools\Filesystem\FilesystemInterface | the filesystem component |
$renderer |
\Twig\Environment | |
$clock |
\Psr\Clock\ClockInterface |
Configures the PHPDoc command.
protected configure(): voidThis method MUST securely configure the expected inputs, such as the --fix option.
Executes the PHPDoc checks and rectifications.
protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): intThe method MUST ensure the .docheader template is present. It SHALL then invoke
PHP-CS-Fixer and Rector. If both succeed, it MUST return self::SUCCESS.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$input |
\Symfony\Component\Console\Input\InputInterface | the command input parameters |
$output |
\Symfony\Component\Console\Output\OutputInterface | the system output handler |
Return Value:
the success or failure state