Sometimes, a UseCase is going to be executed from a Cron job or the command line. As examples, batch processing or some testing command lines to accelerate the development. While testing this feature using the web or the API, you realize that it would be nice to have a command line to do it, so you don't have to go through the browser.
If you are using shell scripts files, I suggest you to check the Symfony Console component. What would the code look like:
namespace Idy\Console\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 VoteIdeaCommand extends Command { protected function configure() { $this ->setName('idea:rate') ->setDescription('Rate an idea') ->addArgument('id', InputArgument::REQUIRED) ->addArgument('rating', InputArgument...