Skip to content
Snippets Groups Projects
Select Git revision
  • 869ed5127d927db08bbfbbb4473ee54506b0d424
  • main default protected
  • v0.2.1
  • v0.2.0
  • v0.1.2
  • v0.1.0
  • v0.1.1
7 results

TestCommand.php

Blame
  • TestCommand.php 764 B
    <?php
    
    declare(strict_types=1);
    
    namespace DBP\API\StarterBundle\Command;
    
    use Symfony\Component\Console\Command\Command;
    use Symfony\Component\Console\Input\InputArgument;
    use Symfony\Component\Console\Input\InputInterface;
    use Symfony\Component\Console\Output\OutputInterface;
    
    class TestCommand extends Command
    {
        public function __construct()
        {
            parent::__construct();
        }
    
        protected function configure()
        {
            $this->addArgument('argument', InputArgument::REQUIRED, 'Example.');
            $this->setDescription('Hey there!');
        }
    
        protected function execute(InputInterface $input, OutputInterface $output)
        {
            $argument = $input->getArgument('argument');
            $output->write($argument);
    
            return 0;
        }
    }