Reducing nesting in the code
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
		@@ -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();
 | 
			
		||||
@@ -59,4 +62,3 @@ class process_events_task extends \core\task\adhoc_task {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user