protected function buildUrl(array $data = []): string
    {
        $params = array_merge([
            'SM_API_KEY' => $this->api_key,
            'SM_LENGTH' => $this->summary_length,
        ], $data);

        $url  = 'http://api.smmry.com';
        $url .= '?' . http_build_query($params);

        return $url;
    }
protected function buildUrl(array $data = []): string
    {
        $params = array_merge([
            'SM_API_KEY' => $this->api_key,
            'SM_LENGTH' => $this->summary_length,
        ], $data);

        $url  = 'http://api.smmry.com';
        $url .= '?' . http_build_query($params);

        return $url;
    }
protected function buildUrl ( array $ data = [ ] ) : string { $ params = array_merge ( [ 'SM_API_KEY' => $ this -> api_key , 'SM_LENGTH' => $ this -> summary_length , ] , $ data ) ; $ url = 'http://api.smmry.com' ; $ url .= '?' . http_build_query ( $ params ) ; return $ url ; }
Builds the API request URL.

@param array $data Key value data to populate URL params.

@return string
Builds the API request URL .