Inject the Retweeter service

This commit is contained in:
Oliver Davies 2019-01-10 23:06:16 +00:00
parent 6b8c05f30a
commit 802a9b0ba2

View file

@ -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