-
-
Notifications
You must be signed in to change notification settings - Fork 0
GitHooksCommand
github-actions edited this page Apr 22, 2026
·
1 revision
Installs packaged Git hooks for the consumer repository.
- Full name:
\FastForward\DevTools\Console\Command\GitHooksCommand - Parent class:
BaseCommand - This class is marked as final and can't be subclassed
- This class implements:
\FastForward\DevTools\Console\Command\LoggerAwareCommandInterface - This class is a Final class
Creates a new GitHooksCommand instance.
public __construct(\FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \Symfony\Component\Config\FileLocatorInterface $fileLocator, \FastForward\DevTools\Filesystem\FinderFactoryInterface $finderFactory, \FastForward\DevTools\Resource\FileDiffer $fileDiffer, \Psr\Log\LoggerInterface $logger): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$filesystem |
\FastForward\DevTools\Filesystem\FilesystemInterface | the filesystem used to copy hooks |
$fileLocator |
\Symfony\Component\Config\FileLocatorInterface | the locator used to find packaged hooks |
$finderFactory |
\FastForward\DevTools\Filesystem\FinderFactoryInterface | the factory used to create finders for hook files |
$fileDiffer |
\FastForward\DevTools\Resource\FileDiffer | |
$logger |
\Psr\Log\LoggerInterface | the output-aware logger |
Configures hook source, target, and initialization options.
protected configure(): voidCopies packaged Git hooks.
protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): intParameters:
| Parameter | Type | Description |
|---|---|---|
$input |
\Symfony\Component\Console\Input\InputInterface | the command input |
$output |
\Symfony\Component\Console\Output\OutputInterface | the command output |
Return Value:
the command status code
Adds the standard JSON output options to the current command.
protected addJsonOption(): staticDetermines whether JSON output was requested.
protected isJsonOutput(\Symfony\Component\Console\Input\InputInterface $input): boolThe pretty-json flag SHALL imply JSON output.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$input |
\Symfony\Component\Console\Input\InputInterface |
Determines whether pretty JSON output was requested.
protected isPrettyJsonOutput(\Symfony\Component\Console\Input\InputInterface $input): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$input |
\Symfony\Component\Console\Input\InputInterface |