<commit_before><?php

namespace LaravelDoctrine\ORM\Pagination;

use Doctrine\ORM\Query;

trait PaginatesFromParams
{
    /**
     * @param int    $perPage
     * @param string $pageName
     *
     * @return \Illuminate\Pagination\LengthAwarePaginator
     */
    public function paginateAll($perPage = 15, $pageName = 'page')
    {
        $query = $this->createQueryBuilder('o')->getQuery();

        return $this->paginate($query, $perPage, $pageName);
    }

    /**
     * @param Query $query
     * @param int   $perPage<commit_msg>PaginateFromParams::paginateAll needs an int $page, not a string (#219)<commit_after><?php

namespace LaravelDoctrine\ORM\Pagination;

use Doctrine\ORM\Query;

trait PaginatesFromParams
{
    /**
     * @param int $perPage
     * @param int $page
     *
     * @return \Illuminate\Pagination\LengthAwarePaginator
     */
    public function paginateAll($perPage = 15, $page = 1)
    {
        $query = $this->createQueryBuilder('o')->getQuery();

        return $this->paginate($query, $perPage, $page);
    }

    /**
     * @param Query $query
     * @param int   $perPage
{'fraction_non_alphanumeric': 0.13746630727762804, 'fraction_numerical': 0.0071877807726864335, 'mean_word_length': 2.8680555555555554, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '7305633', 'n_tokens_mistral': 365, 'n_tokens_neox': 364, 'n_words': 73}