<commit_before><?php

namespace Rudolf\Component\Routing;

class Route
{
    /**
     * @var string
     */
    private $path;

    /**
     * @var string
     */
    private $controllerName;

    /**
     * @var array
     */
    private $params = [];

    /**
     * @var array
     */
    private $defaults = [];

    /**
     * @var int
     */
    private $priority;

    /**
     * Constructor.
     *
     * @param array  $controllerName Controller to use for route
     * @param array  $params         Params
     * @param array  $defaults       An array of default parameter values
     * @param int    $priority       Route priority
     */
    public function __construct($path, $controllerName, array $params = [], array $defaults = [], $priority = 1000)
    {
        $this->setPath($path);
        $this->setControllerName($controllerName);
        $this->setParams($params);
        $this->setDefaults($defaults);
        $this->setPriority($priority);
    }

    /**
     * Sets the pattern for the path.
     *
     * @param string $pattern The path pattern
     */
    private function setPath($path)
    {
        $this->path = '/'.ltrim(trim($path), '/');
    }

    /**
     * Returns the path.
     *
     * @return string $path<commit_msg>Fix tab<commit_after><?php

namespace Rudolf\Component\Routing;

class Route
{
    /**
     * @var string
     */
    private $path;

    /**
     * @var string
     */
    private $controllerName;

    /**
     * @var array
     */
    private $params = [];

    /**
     * @var array
     */
    private $defaults = [];

    /**
     * @var int
     */
    private $priority;

    /**
     * Constructor.
     *
     * @param array $controllerName Controller to use for route
     * @param array $params         Params
     * @param array $defaults       An array of default parameter values
     * @param int   $priority       Route priority
     */
    public function __construct($path, $controllerName, array $params = [], array $defaults = [], $priority = 1000)
    {
        $this->setPath($path);
        $this->setControllerName($controllerName);
        $this->setParams($params);
        $this->setDefaults($defaults);
        $this->setPriority($priority);
    }

    /**
     * Sets the pattern for the path.
     *
     * @param string $pattern The path pattern
     */
    private function setPath($path)
    {
        $this->path = '/'.ltrim(trim($path), '/');
    }

    /**
     * Returns the path.
     *
     * @return string $path
{'fraction_non_alphanumeric': 0.14160700079554495, 'fraction_numerical': 0.0031821797931583136, 'mean_word_length': 1.8322072072072073, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '5192833', 'n_tokens_mistral': 739, 'n_tokens_neox': 716, 'n_words': 180}