Reducing nesting in the code
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
67cf87d17c
commit
36ddf415c4
@ -45,7 +45,10 @@ class process_events_task extends \core\task\adhoc_task {
|
||||
$services = \local_webhooks_api::get_services_by_event( $this->get_custom_data()->eventname );
|
||||
|
||||
foreach ( $services as $service ) {
|
||||
if ( !empty( $service->status ) ) {
|
||||
if ( empty( $service->status ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$curl = new \curl();
|
||||
|
||||
$event = (array) $this->get_custom_data();
|
||||
@ -58,5 +61,4 @@ class process_events_task extends \core\task\adhoc_task {
|
||||
$curl->getResponse();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user