1
0
mirror of synced 2024-11-24 05:46:08 +03:00
service-bundle/Tests/Fixtures/App/TestCommand.php
2021-03-31 11:00:48 +03:00

37 lines
956 B
PHP

<?php
namespace RetailCrm\ServiceBundle\Tests\Fixtures\App;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class TestCommand extends Command
{
protected static $defaultName = 'test';
protected function configure(): void
{
$this
->addArgument(
'argument',
InputArgument::REQUIRED
)
->addOption(
'option',
null,
InputOption::VALUE_REQUIRED
)
;
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
echo self::$defaultName . ' ' . $input->getArgument('argument') . ' ' . $input->getOption('option');
return Command::SUCCESS;
}
}