[REFACTOR] Added explicit return type to all instances of QueueHandler::handle
This commit is contained in:
committed by
Diogo Cordeiro
parent
aaabf82eff
commit
0030fe3aeb
@@ -33,7 +33,7 @@ class HubConfQueueHandler extends QueueHandler
|
||||
return 'hubconf';
|
||||
}
|
||||
|
||||
function handle($data)
|
||||
function handle($data) : bool
|
||||
{
|
||||
$sub = $data['sub'];
|
||||
$mode = $data['mode'];
|
||||
|
@@ -31,7 +31,7 @@ class HubOutQueueHandler extends QueueHandler
|
||||
return 'hubout';
|
||||
}
|
||||
|
||||
function handle($data)
|
||||
function handle($data) : bool
|
||||
{
|
||||
assert(array_key_exists('atom', $data));
|
||||
assert(is_string($data['atom']));
|
||||
|
@@ -43,7 +43,7 @@ class HubPrepQueueHandler extends QueueHandler
|
||||
return 'hubprep';
|
||||
}
|
||||
|
||||
function handle($data)
|
||||
function handle($data) : bool
|
||||
{
|
||||
$topic = $data['topic'];
|
||||
$atom = $data['atom'];
|
||||
|
@@ -44,7 +44,7 @@ class OStatusQueueHandler extends QueueHandler
|
||||
return 'ostatus';
|
||||
}
|
||||
|
||||
function handle($notice): bool
|
||||
function handle($notice) : bool
|
||||
{
|
||||
if (!($notice instanceof Notice)) {
|
||||
common_log(LOG_ERR, "Got a bogus notice, not distributing");
|
||||
|
@@ -31,7 +31,7 @@ class PushInQueueHandler extends QueueHandler
|
||||
return 'pushin';
|
||||
}
|
||||
|
||||
function handle($data): bool
|
||||
function handle($data) : bool
|
||||
{
|
||||
if (!is_array($data)) {
|
||||
common_log(LOG_ERR, "Got bogus data, not processing");
|
||||
|
@@ -30,7 +30,7 @@ class PushRenewQueueHandler extends QueueHandler
|
||||
return 'pushrenew';
|
||||
}
|
||||
|
||||
function handle($data)
|
||||
function handle($data) : bool
|
||||
{
|
||||
$feedsub_id = $data['feedsub_id'];
|
||||
$feedsub = FeedSub::getKV('id', $feedsub_id);
|
||||
|
@@ -33,7 +33,7 @@ class SalmonQueueHandler extends QueueHandler
|
||||
return 'salmon';
|
||||
}
|
||||
|
||||
function handle($data)
|
||||
function handle($data) : bool
|
||||
{
|
||||
assert(is_array($data));
|
||||
assert(is_string($data['salmonuri']));
|
||||
|
Reference in New Issue
Block a user