function( ContainerInterface $container ) : array { $endpoint = $container->get( 'api.endpoint.webhook' ); assert( $endpoint instanceof WebhookEndpoint ); $state = $container->get( 'onboarding.state' ); if ( $state->current_state() >= State::STATE_ONBOARDED ) { return $endpoint->list(); } return array(); }, );