<commit_before><?php
namespace Vanio\DomainBundle\Pagination;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
use Symfony\Component\HttpFoundation\Request;

class FilterParamConverter implements ParamConverterInterface
{
    /** @var array */
    private $options;

    public function __construct(array $options = [])
    {
        $this->options = $options + [
            'dql_alias' => null,
            'page_class' => PageRange::class,
        ];
    }

    public function apply(Request $request, ParamConverter $configuration): bool
    {
        $options = $configuration->getOptions() + $this->options;
        $configuration->setClass($options['page_class']);
        (new OrderByParamConverter($options))->apply($request, $configuration);
        $orderBy = $request->attributes->get($configuration->getName());
        (new PageParamConverter($options))->apply($request, $configuration);
        $page = $request->attributes->get($configuration->getName());
        $filter = new Filter($orderBy, $page, $options['dql_alias']);
        $request->attributes->set($configuration->getName(), $filter);
<commit_msg>Changed default Filter Page implementation from PageRange to Page<commit_after><?php
namespace Vanio\DomainBundle\Pagination;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
use Symfony\Component\HttpFoundation\Request;

class FilterParamConverter implements ParamConverterInterface
{
    /** @var array */
    private $options;

    public function __construct(array $options = [])
    {
        $this->options = $options + [
            'dql_alias' => null,
            'page_class' => Page::class,
        ];
    }

    public function apply(Request $request, ParamConverter $configuration): bool
    {
        $options = $configuration->getOptions() + $this->options;
        $configuration->setClass($options['page_class']);
        (new OrderByParamConverter($options))->apply($request, $configuration);
        $orderBy = $request->attributes->get($configuration->getName());
        (new PageParamConverter($options))->apply($request, $configuration);
        $page = $request->attributes->get($configuration->getName());
        $filter = new Filter($orderBy, $page, $options['dql_alias']);
        $request->attributes->set($configuration->getName(), $filter);

{'fraction_non_alphanumeric': 0.1400716275368086, 'fraction_numerical': 0.0, 'mean_word_length': 4.120162932790224, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '2996522', 'n_tokens_mistral': 637, 'n_tokens_neox': 638, 'n_words': 118}