<commit_before><?php
namespace Asgard\Http;

/**
 * URL class.
 * @author <NAME> <<EMAIL>>
 */
class URL implements URLInterface {
	/**
	 * Request instance.
	 * @var Request
	 */
	protected $request;
	/**
	 * Host address.
	 * @var string
	 */
	protected $host;
	/**
	 * Root path.
	 * @var string
	 */
	protected $root;
	/**
	 * Url.
	 * @var string
	 */
	protected $url;
	/**
	 * Protocol.
	 * @var string
	 */
	protected $protocol;

	/**
	 * Constructor.
	 * @param Request $request
	 * @param string  $host
	 * @param string  $root
	 * @param string  $url
	 */
	public function __construct(Request $request, $host=null, $root=null, $url=null, $protocol=null) {
		$this->request = $request;
		$this->host = $host;
		$this->root = $root;
		$this->url = $url;
		$this->protocol = $protocol;
	}

	/**
	 * {@inheritDoc}
	 */
	public function get() {
		return $this->url;
	}

	/**
	 * {@inheritDoc}
	 */
	public function setURL($url) {
		return $this->url = $url;
	}

	/**
	 * {@inheritDoc}
	 */
	public function setHost($host) {
		return $this->host = $host;
	}

	/**
	 * {@inheritDoc}<commit_msg>fix http/url<commit_after><?php
namespace Asgard\Http;

/**
 * URL class.
 * @author <NAME> <<EMAIL>>
 */
class URL implements URLInterface {
	/**
	 * Request instance.
	 * @var Request
	 */
	protected $request;
	/**
	 * Host address.
	 * @var string
	 */
	protected $host;
	/**
	 * Root path.
	 * @var string
	 */
	protected $root;
	/**
	 * Url.
	 * @var string
	 */
	protected $url;
	/**
	 * Protocol.
	 * @var string
	 */
	protected $protocol;

	/**
	 * Constructor.
	 * @param Request $request
	 * @param string  $host
	 * @param string  $root
	 * @param string  $url
	 */
	public function __construct(Request $request, $host=null, $root=null, $url=null, $protocol=null) {
		$this->request = $request;
		$this->host = $host;
		$this->root = $root;
		$this->url = ltrim($url, '/');
		$this->protocol = $protocol;
	}

	/**
	 * {@inheritDoc}
	 */
	public function get() {
		return $this->url;
	}

	/**
	 * {@inheritDoc}
	 */
	public function setURL($url) {
		return $this->url = ltrim($url, '/');
	}

	/**
	 * {@inheritDoc}
	 */
	public function setHost($host) {
		return $this->host = $host;
	}

	/**
	 * {@inheritDoc}
{'fraction_non_alphanumeric': 0.19350473612990526, 'fraction_numerical': 0.0, 'mean_word_length': 2.740303541315346, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, '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': '4339227', 'n_tokens_mistral': 860, 'n_tokens_neox': 776, 'n_words': 184}