<commit_before><?php

namespace Datatheke\Bundle\PagerBundle\DataGrid\Handler\Http;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

use Datatheke\Bundle\PagerBundle\DataGrid\HttpDatagridInterface;
use Datatheke\Bundle\PagerBundle\Pager\Handler\Http\JqGridHandler as jqGridPagerHandler;

class JqGridHandler extends AbstractHandler
{
    protected $pagerHandler;

    public function __construct()
    {
        $this->pagerHandler = new JqGridPagerHandler();
    }

    public function handleRequest(HttpDatagridInterface $datagrid, Request $request)
    {
        $pager = $datagrid->getPager();
        $this->pagerHandler->handleRequest($pager, $request);

        return $this->createView($datagrid, $request);
    }

    protected function createView(HttpDatagridInterface $datagrid, Request $request)
    {
        $pager = $datagrid->getPager();

        $response = array(
            'page' => $pager->getCurrentPageNumber(),
            'total' => $pager->getPageCount(),
            'records' => $pager->getTotalItemCount(),
            'rows' => $this->getItems($datagrid)
        );

        return $this->createJsonResponse($response);
    }
}
<commit_msg>Unused use statement<commit_after><?php

namespace Datatheke\Bundle\PagerBundle\DataGrid\Handler\Http;

use Symfony\Component\HttpFoundation\Request;

use Datatheke\Bundle\PagerBundle\DataGrid\HttpDatagridInterface;
use Datatheke\Bundle\PagerBundle\Pager\Handler\Http\JqGridHandler as jqGridPagerHandler;

class JqGridHandler extends AbstractHandler
{
    protected $pagerHandler;

    public function __construct()
    {
        $this->pagerHandler = new JqGridPagerHandler();
    }

    public function handleRequest(HttpDatagridInterface $datagrid, Request $request)
    {
        $pager = $datagrid->getPager();
        $this->pagerHandler->handleRequest($pager, $request);

        return $this->createView($datagrid, $request);
    }

    protected function createView(HttpDatagridInterface $datagrid, Request $request)
    {
        $pager = $datagrid->getPager();

        $response = array(
            'page' => $pager->getCurrentPageNumber(),
            'total' => $pager->getPageCount(),
            'records' => $pager->getTotalItemCount(),
            'rows' => $this->getItems($datagrid)
        );

        return $this->createJsonResponse($response);
    }
}

{'fraction_non_alphanumeric': 0.12197159565580618, 'fraction_numerical': 0.0, 'mean_word_length': 3.468283582089552, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '3418254', 'n_tokens_mistral': 728, 'n_tokens_neox': 715, 'n_words': 116}