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);
|
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 ResponseInterface $response
|
||||||
* @param bool $decodeJson
|
* @param bool $decodeJson
|
||||||
|
|
|
@ -50,7 +50,7 @@ class SubscriptionsManager
|
||||||
* @param User $user
|
* @param User $user
|
||||||
* @param User[] $newSubscribersList
|
* @param User[] $newSubscribersList
|
||||||
*/
|
*/
|
||||||
public function updateUserSubscribers(User $user, $newSubscribersList = [])
|
public function updateUserSubscribers(User $user, $newSubscribersList = []): void
|
||||||
{
|
{
|
||||||
$tmpOldSubscribers = $user->getSubscribers();
|
$tmpOldSubscribers = $user->getSubscribers();
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ class SubscriptionsManager
|
||||||
* @param User $user
|
* @param User $user
|
||||||
* @param User[] $subscribers
|
* @param User[] $subscribers
|
||||||
*/
|
*/
|
||||||
private function processSubscribedUsers(User $user, array $subscribers)
|
private function processSubscribedUsers(User $user, array $subscribers): void
|
||||||
{
|
{
|
||||||
$this->logger->debug('Processing subscribed users');
|
$this->logger->debug('Processing subscribed users');
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ class SubscriptionsManager
|
||||||
* @param User $user
|
* @param User $user
|
||||||
* @param User[] $subscribers
|
* @param User[] $subscribers
|
||||||
*/
|
*/
|
||||||
private function processUnsubscribedUsers(User $user, array $subscribers)
|
private function processUnsubscribedUsers(User $user, array $subscribers): void
|
||||||
{
|
{
|
||||||
$this->logger->debug('Processing unsubscribed users');
|
$this->logger->debug('Processing unsubscribed users');
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class SubscriptionsManager
|
||||||
* @param User[] $subscribed
|
* @param User[] $subscribed
|
||||||
* @param User[] $unsubscribed
|
* @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)) {
|
if (0 !== count($subscribed) || 0 !== count($unsubscribed)) {
|
||||||
// Dispatching event
|
// Dispatching event
|
||||||
|
|
Loading…
Reference in a new issue