<commit_before><?php

namespace ByJG\RestServer;

use ByJG\RestServer\HandleOutput\JsonHandler;

class RoutePattern
{
    /**
     * @var string|array
     */
    protected $method;

    /**
     * @var string
     */
    protected $pattern;

    /**
     * @var string
     */
    protected $handler;

    /**
     * RoutePattern constructor.
     *
     * @param array|string $method
     * @param string $pattern
     * @param string $handler
     */
    public function __construct($method, $pattern, $handler = null)
    {
        $this->method = $method;
        $this->pattern = $pattern;

        if (is_null($handler)) {
            $handler = JsonHandler::class;
        }
        $this->handler = $handler;
    }

    /**
     * @return array|string
     */
    public function getMethod()
    {
        return $this->method;
    }

    /**
     * @return string
     */
    public function getPattern()
    {
        return $this->pattern;
    }

    /**
     * @return string
     */
    public function getHandler()
    {
        return $this->handler;
   }
}
<commit_msg>Added the setter for RoutePattern<commit_after><?php

namespace ByJG\RestServer;

use ByJG\RestServer\HandleOutput\JsonHandler;

class RoutePattern
{
    /**
     * @var string|array
     */
    protected $method;

    /**
     * @var string
     */
    protected $pattern;

    /**
     * @var string
     */
    protected $handler;

    /**
     * RoutePattern constructor.
     *
     * @param array|string $method
     * @param string $pattern
     * @param string $handler
     */
    public function __construct($method, $pattern, $handler = null)
    {
        $this->method = $method;
        $this->pattern = $pattern;

        if (is_null($handler)) {
            $handler = JsonHandler::class;
        }
        $this->handler = $handler;
    }

    /**
     * @return array|string
     */
    public function getMethod()
    {
        return $this->method;
    }

    /**
     * @return string
     */
    public function getPattern()
    {
        return $this->pattern;
    }

    /**
     * @return string
     */
    public function getHandler()
    {
        return $this->handler;
    }

    /**
     * @param array|string $method
     */
    public function setMethod($method)
    {
        $this->method = $method;
    }

    /**
     * @param string $pattern
     */
    public function setPattern($pattern)
    {
        $this->pattern = $pattern;
    }

    /**
     * @param string $handler
     */
    public function setHandler($handler)
    {
        $this->handler = $handler;
    }
}

{'fraction_non_alphanumeric': 0.13389765294343978, 'fraction_numerical': 0.0, 'mean_word_length': 1.7196652719665273, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, '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': '74058', 'n_tokens_mistral': 785, 'n_tokens_neox': 769, 'n_words': 162}