UpdateSubscriptionsCommand dependency setting minified.
This commit is contained in:
parent
845097f7ea
commit
013fb3ef3d
|
@ -62,24 +62,13 @@ class UpdateSubscriptionsCommand extends ContainerAwareCommand
|
|||
private $progress;
|
||||
|
||||
|
||||
public function setLogger(LoggerInterface $logger): void
|
||||
public function setDeps(LoggerInterface $logger, EntityManagerInterface $em, UserRepository $userRepo, UserApi $userApi, SubscriptionsManager $subscriptionsManager): void
|
||||
{
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
public function setEntityManager(EntityManagerInterface $em): void
|
||||
{
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
public function setUserRepository(UserRepository $repository): void
|
||||
{
|
||||
$this->userRepo = $repository;
|
||||
}
|
||||
|
||||
public function setApiClient(UserApi $userApi): void
|
||||
{
|
||||
$this->userRepo = $userRepo;
|
||||
$this->api = $userApi;
|
||||
$this->subscriptionManager = $subscriptionsManager;
|
||||
}
|
||||
|
||||
public function setApiDelay(int $microSecs): void
|
||||
|
@ -87,11 +76,6 @@ class UpdateSubscriptionsCommand extends ContainerAwareCommand
|
|||
$this->apiDelay = $microSecs;
|
||||
}
|
||||
|
||||
public function setSubscriptionManager(SubscriptionsManager $subscriptionsManager): void
|
||||
{
|
||||
$this->subscriptionManager = $subscriptionsManager;
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
|
@ -109,7 +93,6 @@ class UpdateSubscriptionsCommand extends ContainerAwareCommand
|
|||
InputOption::VALUE_NONE,
|
||||
'If set, command will not perform write operations in the database'
|
||||
)
|
||||
// @todo add option for checking only selected user
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,12 +55,8 @@ services:
|
|||
class: Skobkin\Bundle\PointToolsBundle\Command\UpdateSubscriptionsCommand
|
||||
#autowire: []
|
||||
calls:
|
||||
- [setLogger, ['@logger']]
|
||||
- [setEntityManager, ['@doctrine.orm.entity_manager']]
|
||||
- [setUserRepository, ['@app.point.user_repository']]
|
||||
- [setApiClient, ['@app.point.api_user']]
|
||||
- [setDeps, ['@logger', '@doctrine.orm.entity_manager', '@app.point.user_repository', '@app.point.api_user', '@app.point.subscriptions_manager']]
|
||||
- [setApiDelay, ['%point_api_delay%']]
|
||||
- [setSubscriptionManager, ['@app.point.subscriptions_manager']]
|
||||
tags:
|
||||
- { name: console.command }
|
||||
- { name: monolog.logger, channel: subscribers_update }
|
||||
|
|
Loading…
Reference in a new issue