From 2ff65f7334fb9f0733d650b7dfe439be40dd821b Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 10 Jan 2019 23:04:07 +0000 Subject: [PATCH] Add RetweetTweetsCommand.php --- src/Command/RetweetTweetsCommand.php | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/Command/RetweetTweetsCommand.php diff --git a/src/Command/RetweetTweetsCommand.php b/src/Command/RetweetTweetsCommand.php new file mode 100644 index 0000000..f0121d4 --- /dev/null +++ b/src/Command/RetweetTweetsCommand.php @@ -0,0 +1,38 @@ +tweetFetcher = $tweetFetcher; + } + protected function configure() + { + $this + ->setDescription('Add a short description for your command') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->tweetFetcher->getTweets()->each(function (array $tweet) { + $this->retweeter->retweet(); + }); + } +}