<commit_before><?php

namespace Perfumer\MVC\Proxy;

class Request
{
    /**
     * @var Request
     */
    protected $initial;

    protected $url;
    protected $args;
    protected $controller;
    protected $action;

    public function init($url, $action, array $args = [])
    {
        $path = explode('/', $url);

        $this->url = $url;
        $this->args = $args;
        $this->action = $action;
        $this->controller = 'App\\Controller\\' . implode('\\', array_map('ucfirst', $path)) . 'Controller';

        return $this;
    }

    public function setInitial(Request $request)
    {
        $this->initial = $request;

        return $this;
    }

    public function getInitial()
    {
        return $this->initial;
    }

    public function isInitial()
    {
        return $this->initial !== null;
    }

    public function getUrl()
    {
        return $this->url;
    }

    public function getArgs()
    {
        return $this->args;
    }

    public function getController()
    {
        return $this->controller;
    }

    public function getAction()
    {
        return $this->action;
    }
}<commit_msg>Remove controller defining logic from Request class<commit_after><?php

namespace Perfumer\MVC\Proxy;

class Request
{
    /**
     * @var Request
     */
    protected $initial;

    protected $url;
    protected $controller;
    protected $action;
    protected $args;

    public function setInitial(Request $request)
    {
        $this->initial = $request;

        return $this;
    }

    public function getInitial()
    {
        return $this->initial;
    }

    public function isInitial()
    {
        return $this->initial !== null;
    }

    public function getUrl()
    {
        return $this->url;
    }

    public function setUrl($url)
    {
        $this->url = $url;

        return $this;
    }

    public function getController()
    {
        return $this->controller;
    }

    public function setController($controller)
    {
        $this->controller = $controller;

        return $this;
    }

    public function getAction()
    {
        return $this->action;
    }

    public function setAction($action)
    {
        $this->action = $action;

        return $this;
    }

    public function getArgs()
    {
        return $this->args;
    }

    public function setArgs(array $args)
    {
        $this->args = $args;

        return $this;
    }
}
{'fraction_non_alphanumeric': 0.12515438452037875, 'fraction_numerical': 0.0, 'mean_word_length': 1.8859857482185274, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7422217', 'n_tokens_mistral': 729, 'n_tokens_neox': 700, 'n_words': 170}