<commit_before><?php

namespace Osedea\LaravelRest\Traits;

trait CommandModel
{
    /*
         * The attributes that can be used for filtering through the API.
         *
         * @var array
         */
    public static $filterable = [];

    /**
     * This holds the maximum number of items per page fot this model.
     * @var integer
     */
    protected $perPageMax = 25;

    public function getPerPageMax()
    {
        return $this->perPage;
    }

    public function setPerPageMax($perPageMax)
    {
        $this->perPageMax = $perPageMax;
    }

    /**
     * This scope automatically sorts a query depending on the request.
     * A request looks like this:
     *      - Sort by [column ASC]:                     ?sort=column
     *      - Sort by [column DESC]:                    ?sort=-column
     *      - Sort by [column1 ASC] and [column2 DESC]: ?sort=column1,-column2
     *
     * @param $query
     * @return mixed
     */
    public function scopeWithRequestSort($query)
    {<commit_msg>Increase the default $maxPerPage attribute to 50<commit_after><?php

namespace Osedea\LaravelRest\Traits;

trait CommandModel
{
    /**
     * The attributes that can be used for filtering through the API.
     *
     * @var array
     */
    public static $filterable = [];

    /**
     * This holds the maximum number of items per page fot this model.
     * @var integer
     */
    protected $perPageMax = 50;

    public function getPerPageMax()
    {
        return $this->perPage;
    }

    public function setPerPageMax($perPageMax)
    {
        $this->perPageMax = $perPageMax;
    }

    /**
     * This scope automatically sorts a query depending on the request.
     * A request looks like this:
     *      - Sort by [column ASC]:                     ?sort=column
     *      - Sort by [column DESC]:                    ?sort=-column
     *      - Sort by [column1 ASC] and [column2 DESC]: ?sort=column1,-column2
     *
     * @param $query
     * @return mixed
     */
    public function scopeWithRequestSort($query)
    {
{'fraction_non_alphanumeric': 0.0970873786407767, 'fraction_numerical': 0.006796116504854369, 'mean_word_length': 1.8906030855539973, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6409386', 'n_tokens_mistral': 604, 'n_tokens_neox': 582, 'n_words': 182}