From d289571c5bf54c90b89ffa9d11a52f80f3b80574 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 13 Jan 2017 02:02:25 +0300 Subject: [PATCH] New PHP 7.1 type hints for commands. --- .../Command/TelegramSetWebHookCommand.php | 4 ++-- .../Command/UpdateSubscriptionsCommand.php | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Command/TelegramSetWebHookCommand.php b/src/Skobkin/Bundle/PointToolsBundle/Command/TelegramSetWebHookCommand.php index e807af9..28cd8fa 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Command/TelegramSetWebHookCommand.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Command/TelegramSetWebHookCommand.php @@ -15,8 +15,8 @@ use unreal4u\TelegramAPI\Telegram\Methods\SetWebhook; */ class TelegramSetWebHookCommand extends ContainerAwareCommand { - const MODE_SET = 'set'; - const MODE_DELETE = 'delete'; + private const MODE_SET = 'set'; + private const MODE_DELETE = 'delete'; /** * {@inheritdoc} diff --git a/src/Skobkin/Bundle/PointToolsBundle/Command/UpdateSubscriptionsCommand.php b/src/Skobkin/Bundle/PointToolsBundle/Command/UpdateSubscriptionsCommand.php index 1828dfd..dba2540 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Command/UpdateSubscriptionsCommand.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Command/UpdateSubscriptionsCommand.php @@ -61,32 +61,32 @@ class UpdateSubscriptionsCommand extends ContainerAwareCommand private $progress; - public function setLogger(LoggerInterface $logger) + public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; } - public function setEntityManager(EntityManagerInterface $em) + public function setEntityManager(EntityManagerInterface $em): void { $this->em = $em; } - public function setUserRepository(UserRepository $repository) + public function setUserRepository(UserRepository $repository): void { $this->userRepo = $repository; } - public function setApiClient(UserApi $userApi) + public function setApiClient(UserApi $userApi): void { $this->api = $userApi; } - public function setApiDelay(int $microSecs) + public function setApiDelay(int $microSecs): void { $this->apiDelay = $microSecs; } - public function setSubscriptionManager(SubscriptionsManager $subscriptionsManager) + public function setSubscriptionManager(SubscriptionsManager $subscriptionsManager): void { $this->subscriptionManager = $subscriptionsManager; } @@ -173,7 +173,7 @@ class UpdateSubscriptionsCommand extends ContainerAwareCommand /** * @param User[] $users */ - private function updateUsersSubscribers(array $users) + private function updateUsersSubscribers(array $users): void { // Updating users subscribers foreach ($users as $user) {