<commit_before><?php

namespace Yolo;

use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;

class RouteBuilder
{
    private $routes;

    public function __construct(RouteCollection $routes)
    {
        $this->routes = $routes;
    }

    public function get($name, $path, $controller)
    {
        $this->addRoute($name, $path, $controller, 'GET');
    }

    public function post($name, $path, $controller)
    {
        $this->addRoute($name, $path, $controller, 'POST');
    }

    public function put($name, $path, $controller)
    {
        $this->addRoute($name, $path, $controller, 'PUT');
    }

    public function delete($name, $path, $controller)
    {
        $this->addRoute($name, $path, $controller, 'DELETE');
    }

    public function addRoute($name, $path, $controller, $method)
    {
        $this->routes->add($name, new Route($path, ['_controller' => $controller], ['_method' => $method]));
    }
}
<commit_msg>Rename RouteBuilder::addRoute to match<commit_after><?php

namespace Yolo;

use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;

class RouteBuilder
{
    private $routes;

    public function __construct(RouteCollection $routes)
    {
        $this->routes = $routes;
    }

    public function get($name, $path, $controller)
    {
        $this->match($name, $path, $controller, 'GET');
    }

    public function post($name, $path, $controller)
    {
        $this->match($name, $path, $controller, 'POST');
    }

    public function put($name, $path, $controller)
    {
        $this->match($name, $path, $controller, 'PUT');
    }

    public function delete($name, $path, $controller)
    {
        $this->match($name, $path, $controller, 'DELETE');
    }

    public function match($name, $path, $controller, $method = null)
    {
        $requirements = $method ? ['_method' => $method] : [];
        $this->routes->add($name, new Route($path, ['_controller' => $controller], $requirements));
    }
}

{'fraction_non_alphanumeric': 0.16608652411735456, 'fraction_numerical': 0.0, 'mean_word_length': 3.200417536534447, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '2819044', 'n_tokens_mistral': 623, 'n_tokens_neox': 626, 'n_words': 139}