New PHP 7.1 type hints for AbstractApi and SubscriptionsManager.
This commit is contained in:
parent
4babc046e6
commit
c1848aad86
|
@ -98,16 +98,6 @@ class AbstractApi
|
|||
return $this->processResponse($response, $decodeJson, $decodeToObjects);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get HTTP client base URL
|
||||
*
|
||||
* @return string Base URL of client
|
||||
*/
|
||||
public function getBaseUrl(): string
|
||||
{
|
||||
return (string) $this->client->getConfig('base_uri');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ResponseInterface $response
|
||||
* @param bool $decodeJson
|
||||
|
|
|
@ -50,7 +50,7 @@ class SubscriptionsManager
|
|||
* @param User $user
|
||||
* @param User[] $newSubscribersList
|
||||
*/
|
||||
public function updateUserSubscribers(User $user, $newSubscribersList = [])
|
||||
public function updateUserSubscribers(User $user, $newSubscribersList = []): void
|
||||
{
|
||||
$tmpOldSubscribers = $user->getSubscribers();
|
||||
|
||||
|
@ -100,7 +100,7 @@ class SubscriptionsManager
|
|||
* @param User $user
|
||||
* @param User[] $subscribers
|
||||
*/
|
||||
private function processSubscribedUsers(User $user, array $subscribers)
|
||||
private function processSubscribedUsers(User $user, array $subscribers): void
|
||||
{
|
||||
$this->logger->debug('Processing subscribed users');
|
||||
|
||||
|
@ -121,7 +121,7 @@ class SubscriptionsManager
|
|||
* @param User $user
|
||||
* @param User[] $subscribers
|
||||
*/
|
||||
private function processUnsubscribedUsers(User $user, array $subscribers)
|
||||
private function processUnsubscribedUsers(User $user, array $subscribers): void
|
||||
{
|
||||
$this->logger->debug('Processing unsubscribed users');
|
||||
|
||||
|
@ -142,7 +142,7 @@ class SubscriptionsManager
|
|||
* @param User[] $subscribed
|
||||
* @param User[] $unsubscribed
|
||||
*/
|
||||
private function dispatchSubscribersUpdatedEvent(User $user, array $subscribed, array $unsubscribed)
|
||||
private function dispatchSubscribersUpdatedEvent(User $user, array $subscribed, array $unsubscribed): void
|
||||
{
|
||||
if (0 !== count($subscribed) || 0 !== count($unsubscribed)) {
|
||||
// Dispatching event
|
||||
|
|
Loading…
Reference in a new issue