From 2d7e80b112c5cc3bd698d8231a05bdd408017db4 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 13 Feb 2019 19:46:20 +0000 Subject: [PATCH] wip --- src/Command/PickWinnerCommand.php | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/Command/PickWinnerCommand.php diff --git a/src/Command/PickWinnerCommand.php b/src/Command/PickWinnerCommand.php new file mode 100644 index 0000000..64bdad2 --- /dev/null +++ b/src/Command/PickWinnerCommand.php @@ -0,0 +1,51 @@ +guzzle = new Client(); + } + + protected function configure() + { + $this + ->setDescription('Add a short description for your command') + ->addArgument('tag', InputArgument::REQUIRED, 'The joind.in tag') + ->addArgument('start', InputArgument::OPTIONAL, '', 'first day of last month') + ->addArgument('end', InputArgument::OPTIONAL, '', 'last day of this month') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + $tag = $input->getArgument('tag'); + $startDate = (new \DateTime($input->getArgument('start')))->format('Y-m-d'); + $endDate = (new \DateTime($input->getArgument('end')))->format('Y-m-d'); + + var_dump([ + 'tag' => $tag, + 'start date' => $startDate, + 'end date' => $endDate, + ]); + +// $io->success('You have a new command! Now make it your own! Pass --help to see your options.'); + } +}