<commit_before><?php

namespace AcceptOn;

class Request {

  public $client, $request_method, $headers, $options, $path;


  private $urls = array(
    'development' => 'http://checkout.accepton.dev',
    'staging' => 'https://staging-checkout.accepton.com',
    'production' => 'https://checkout.accepton.com'
  );

  public function __construct($client, $request_method, $path, $options = null) {
      $options = array_merge($this->default_options(), $options);
      $url = $this->urls[$options["environment"]];
      $this->client = $client;
      $this->request_method = strtolower($request_method);
      $uri = Utils::startsWith($path, 'http') ? $path : $url.$path;
      $this->options = $options;
      $this->path = $uri;
      $headers = new \AcceptOn\Headers($client);
      $this->headers = $headers->request_headers();
  }

  public function default_options() {
    return array('environment' => 'production');
  }

  # @return [Hashie::Mash] if the request reutrns a success code
  # @raise [AcceptOn::Error] if the request returns a failure code
  public function perform() {
    $curl = curl_init();<commit_msg>Remove old comment<commit_after><?php

namespace AcceptOn;

class Request {

  public $client, $request_method, $headers, $options, $path;


  private $urls = array(
    'development' => 'http://checkout.accepton.dev',
    'staging' => 'https://staging-checkout.accepton.com',
    'production' => 'https://checkout.accepton.com'
  );

  public function __construct($client, $request_method, $path, $options = null) {
      $options = array_merge($this->default_options(), $options);
      $url = $this->urls[$options["environment"]];
      $this->client = $client;
      $this->request_method = strtolower($request_method);
      $uri = Utils::startsWith($path, 'http') ? $path : $url.$path;
      $this->options = $options;
      $this->path = $uri;
      $headers = new \AcceptOn\Headers($client);
      $this->headers = $headers->request_headers();
  }

  public function default_options() {
    return array('environment' => 'production');
  }

  public function perform() {
    $curl = curl_init();
{'fraction_non_alphanumeric': 0.17158931082981715, 'fraction_numerical': 0.0, 'mean_word_length': 3.8390022675736963, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 4, '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': '2816385', 'n_tokens_mistral': 667, 'n_tokens_neox': 660, 'n_words': 141}