<commit_before><?php

namespace App\Middleware;

use App\TwigExtension\Csrf;
use Interop\Container\ContainerInterface;

class CsrfMiddleware
{
    private $container;

    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;
    }

    public function __invoke($request, $response, $next)
    {
        $this->container['view']->addExtension(new Csrf($this->container['csrf']));
        return $next($request, $response);
    }
}<commit_msg>CsrfMiddleware now extends base Middleware class<commit_after><?php

namespace App\Middleware;

use App\TwigExtension\Csrf;

class CsrfMiddleware extends Middleware
{
    public function __invoke($request, $response, $next)
    {
        $this->view->addExtension(new Csrf($this->csrf));
        return $next($request, $response);
    }
}
{'fraction_non_alphanumeric': 0.12771084337349398, 'fraction_numerical': 0.0, 'mean_word_length': 4.067073170731708, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '1351197', 'n_tokens_mistral': 249, 'n_tokens_neox': 249, 'n_words': 51}