From 802a9b0ba2ed095485ab97b477a60845c2695a11 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 10 Jan 2019 23:06:16 +0000 Subject: [PATCH] Inject the Retweeter service --- src/Command/RetweetTweetsCommand.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Command/RetweetTweetsCommand.php b/src/Command/RetweetTweetsCommand.php index f0121d4..c717d7d 100644 --- a/src/Command/RetweetTweetsCommand.php +++ b/src/Command/RetweetTweetsCommand.php @@ -2,6 +2,7 @@ namespace App\Command; +use App\Service\Retweeter; use App\Service\TweetFetcher; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; @@ -16,12 +17,16 @@ class RetweetTweetsCommand extends Command private $tweetFetcher; - public function __construct(TweetFetcher $tweetFetcher) + private $retweeter; + + public function __construct(TweetFetcher $tweetFetcher, Retweeter $retweeter) { parent::__construct(); $this->tweetFetcher = $tweetFetcher; + $this->retweeter = $retweeter; } + protected function configure() { $this