Inject the Retweeter service
This commit is contained in:
parent
6b8c05f30a
commit
802a9b0ba2
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Command;
|
namespace App\Command;
|
||||||
|
|
||||||
|
use App\Service\Retweeter;
|
||||||
use App\Service\TweetFetcher;
|
use App\Service\TweetFetcher;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
@ -16,12 +17,16 @@ class RetweetTweetsCommand extends Command
|
||||||
|
|
||||||
private $tweetFetcher;
|
private $tweetFetcher;
|
||||||
|
|
||||||
public function __construct(TweetFetcher $tweetFetcher)
|
private $retweeter;
|
||||||
|
|
||||||
|
public function __construct(TweetFetcher $tweetFetcher, Retweeter $retweeter)
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->tweetFetcher = $tweetFetcher;
|
$this->tweetFetcher = $tweetFetcher;
|
||||||
|
$this->retweeter = $retweeter;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
|
|
Loading…
Reference in a new issue