<commit_before><?php

class ShippingEasy_SignedUrl
{
  public function __construct($http_method=null, $path=null, $params=null, $json_body=null, $api_timestamp=null)
  {
    $secret = ShippingEasy::$apiSecret;    
    $params["api_key"] = ShippingEasy::$apiKey;
    $params["api_timestamp"] = isset($api_timestamp) ? $api_timestamp : time();
    $signature_object = new ShippingEasy_Signature($secret, $http_method, $path, $params, $json_body);
    $params["api_signature"] = $signature_object->encrypted();        
    $this->params = $params;
    $this->path = $path;
  }

  public function getParams()
  {
    return $this->params;
  }
  
  public function getPath()<commit_msg>Allow local override of api key and secret.<commit_after><?php

class ShippingEasy_SignedUrl
{
  public function __construct($http_method=null, $path=null, $params=null, $json_body=null, $api_timestamp=null, $api_secret = null, $api_key = null)
  {
    $api_secret = isset($api_secret) ? $api_secret : ShippingEasy::$apiSecret;    
    $params["api_key"] = isset($api_key) ? $api_key : ShippingEasy::$apiKey;
    $params["api_timestamp"] = isset($api_timestamp) ? $api_timestamp : time();
    $signature_object = new ShippingEasy_Signature($api_secret, $http_method, $path, $params, $json_body);
    $params["api_signature"] = $signature_object->encrypted();        
    
    $this->params = $params;
    $this->path = $path;
  }

  public function getParams()
  {
    return $this->params;
  }
  
  public function getPath()
{'fraction_non_alphanumeric': 0.14940239043824702, 'fraction_numerical': 0.0, 'mean_word_length': 4.665413533834586, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1184763', 'n_tokens_mistral': 500, 'n_tokens_neox': 491, 'n_words': 92}