<commit_before><?php

namespace Evence\Bundle\GridBundle\Grid;
use Symfony\Bridge\Twig\TwigEngine;
use Symfony\Component\BrowserKit\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Doctrine\Bundle\DoctrineBundle\Registry;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\Route;
use Symfony\Bundle\FrameworkBundle\Routing\Router;

class GridHelper {
    
    /**
     *
     * @var TwigEngine
     */
    private $templating = null;
    
    /**
     *
     * @var Request
     */
    private $request = null;
    
    /**
     *
     * @var Router
     */
    private $router = null;
    
    /**
     *
     * @var Session
     */
    private $session = null;
    
    /**
     * @var Registry
     */
    private $doctrine = null;
    
    
    public function createGrid(Grid $grid) {        
        $grid->setTemplating($this->templating)->setDoctrine($this->doctrine)->setRequest($this->request)->setRouter($this->router)->setSession($this->session);
        return $grid;
    }
    
    /**
     * Inject services
     * 
     * @param Registry $doctrine
     * @param TwigEngine $templating
     * @param Request $request
     * @param Router $router
     * @param Session $session
     */
    public function __construct(Registry $doctrine, TwigEngine $templating, RequestStack $request, Router $router, Session $session){
        $this->doctrine = $doctrine;
        $this->templating = $templating;
        $this->request = $request->getCurrentRequest();
        $this->router = $router;
        $this->session = $session;
    }

    public function setTemplating(TwigEngine $templating)
    {
        $this->templating = $templating;
        return $this;
    }
    public function setRequest(Request $request)
    {
        $this->request = $request;
        return $this;
    }

    

    public function setRouter(Router $router)
    {
        $this->router = $router;
        return $this;
    }

 

    public function setSession(Session $session)
    {
        $this->session = $session;
        return $this;
    }

 
    public function setDoctrine(Registry $doctrine)
    {
        $this->doctrine = $doctrine;
        return $this;
    }
 
    

}<commit_msg>Added gitResponse<commit_after><?php

namespace Evence\Bundle\GridBundle\Grid;
use Symfony\Bridge\Twig\TwigEngine;
use Symfony\Component\BrowserKit\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Doctrine\Bundle\DoctrineBundle\Registry;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\Route;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\HttpFoundation\Response;

class GridHelper {
    
    /**
     *
     * @var TwigEngine
     */
    private $templating = null;
    
    /**
     *
     * @var Request
     */
    private $request = null;
    
    /**
     *
     * @var Router
     */
    private $router = null;
    
    /**
     *
     * @var Session
     */
    private $session = null;
    
    /**
     * @var Registry
     */
    private $doctrine = null;
    
    
    public function createGrid(Grid $grid) {        
        $grid->setTemplating($this->templating)->setDoctrine($this->doctrine)->setRequest($this->request)->setRouter($this->router)->setSession($this->session);
        return $grid;
    }
    
    /**
     * Inject services
     * 
     * @param Registry $doctrine
     * @param TwigEngine $templating
     * @param Request $request
     * @param Router $router
     * @param Session $session
     */
    public function __construct(Registry $doctrine, TwigEngine $templating, RequestStack $request, Router $router, Session $session){
        $this->doctrine = $doctrine;
        $this->templating = $templating;
        $this->request = $request->getCurrentRequest();
        $this->router = $router;
        $this->session = $session;
    }

    public function setTemplating(TwigEngine $templating)
    {
        $this->templating = $templating;
        return $this;
    }
    public function setRequest(Request $request)
    {
        $this->request = $request;
        return $this;
    }

    

    public function setRouter(Router $router)
    {
        $this->router = $router;
        return $this;
    }

 

    public function setSession(Session $session)
    {
        $this->session = $session;
        return $this;
    }

 
    public function setDoctrine(Registry $doctrine)
    {
        $this->doctrine = $doctrine;
        return $this;
    }
 
    /**
     * Renders a view.
     *
     * @param string   $view       The view name
     * @param array    $parameters An array of parameters to pass to the view
     * @param Response $response   A response instance
     *
     * @return Response A Response instance
     */
    public function gridRespose($view, array $parameters = array(), Response $response = null){
        return $this->templating->renderResponse($view, $parameters, $response);
    }

}
{'fraction_non_alphanumeric': 0.1199195171026157, 'fraction_numerical': 0.0, 'mean_word_length': 2.2942345924453282, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, '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': '3469818', 'n_tokens_mistral': 1491, 'n_tokens_neox': 1467, 'n_words': 308}