src/BaseProxyConnector.php
protected function getEndpointConfig( $endpoint = null ) {
		if ( $endpoint === null ) {
			throw new \Exception( 'Endpoint is null' );
		}

		if ( ! isset( $this->endpointsConfig[ $endpoint ] ) ) {
			throw new \Exception( 'Endpoint is not defined in the config.' );
		}

		if ( ! is_array( $this->endpointsConfig ) || $this->endpointsConfig === [] ) {
			throw new \Exception( 'There are not Endpoints configurations set, please define the endpoints first.' );
		}


		return $this->endpointsConfig[ $endpoint ];
	}
protected function getEndpointConfig( $endpoint = null ) {
		if ( $endpoint === null ) {
			throw new \Exception( 'Endpoint is null' );
		}

		if ( ! isset( $this->endpointsConfig[ $endpoint ] ) ) {
			throw new \Exception( 'Endpoint is not defined in the config.' );
		}

		if ( ! is_array( $this->endpointsConfig ) || $this->endpointsConfig === [] ) {
			throw new \Exception( 'There are not Endpoints configurations set, please define the endpoints first.' );
		}


		return $this->endpointsConfig[ $endpoint ];
	}
@param null $endpoint

@return array
@throws \Exception