<commit_before><?php

class Request
{
	private $method;
	private $path;
	private $data;
	
	public function __construct(string $method, string $route, array $data)
	{
		$path = parse_url($route, PHP_URL_PATH);
		$path = rtrim($path, '/');
		
		if (empty($path))
		{
			$path = '/';
		}
		
		$this->method = $method;
		$this->path = $path;
		$this->data = $data;
	}
	<commit_msg>Simplifying this a wee bit.<commit_after><?php

class Request
{
	private $method;
	private $path;
	private $data;
	
	public function __construct(string $method, string $route, array $data)
	{
		$path = parse_url($route, PHP_URL_PATH);
		$path = rtrim($path, '/') ?: '/';
		
		$this->method = $method;
		$this->path = $path;
		$this->data = $data;
	}
	
{'fraction_non_alphanumeric': 0.17994505494505494, 'fraction_numerical': 0.0, 'mean_word_length': 3.643312101910828, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1318256', 'n_tokens_mistral': 299, 'n_tokens_neox': 271, 'n_words': 63}