src/Command/GithubInitCommand.php
<?php
namespace Whitecat\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Filesystem\Filesystem;
use Whitecat\Service\GithubInitService;
#[AsCommand(
name: 'github:init',
description: 'Generate basic Github directory with starter files',
hidden: false
)]
class GithubInitCommand extends Command
{
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
$fs = new Filesystem();
return (new GithubInitService($io, $fs))->run();
}
}