<commit_before><?php
/**
 * The KalturaPager object enables paging management to be applied upon service list/search actions.
 * @package api
 * @subpackage objects
 */
class KalturaPager extends KalturaObject
{
    const MIN_PAGE_INDEX = 1;
    const MAX_PAGE_SIZE = 500;

    /**
     * The number of objects to retrieve. (Default is 30, maximum page size is 500).
     *
     * @var int
     */
    public $pageSize = 30;

    /**
     * The page number for which {pageSize} of objects should be retrieved (Default is 1).
     *
     * @var int
     */
    public $pageIndex = 1;

    private static $map_between_objects = array(
        'pageSize',
        'pageIndex',
    );

    /* (non-PHPdoc)
	 * @see KalturaObject::getMapBetweenObjects()
	 */
    public function getMapBetweenObjects()
    {
        return array_merge(parent::getMapBetweenObjects(), self::$map_between_objects);
    }

    public function toObject($object = null, $skipProperties = array())
    {
        if (!$object)
        {
            $object = new kPager();
        }

        $object->setPageSize($this->calcPageSize());
        $object->setPageIndex($this->calcPageIndex());

        return parent::toObject($object, array('pageSize', 'pageIndex'));
    }

    public function calcPageSize()
    {
        return max(min($this->pageSize, self::MAX_PAGE_SIZE), 0);
    }

    public function calcPageIndex()
    {
        return max(self::MIN_PAGE_INDEX, $this->pageIndex);
    }

    public function calcOffset()
    {
        return ($this->calcPageIndex() - 1) * $this->calcPageSize();
    }

}
<commit_msg>remove pageSize and pageIndex from map between objects<commit_after><?php
/**
 * The KalturaPager object enables paging management to be applied upon service list/search actions.
 * @package api
 * @subpackage objects
 */
class KalturaPager extends KalturaObject
{
    const MIN_PAGE_INDEX = 1;
    const MAX_PAGE_SIZE = 500;

    /**
     * The number of objects to retrieve. (Default is 30, maximum page size is 500).
     *
     * @var int
     */
    public $pageSize = 30;

    /**
     * The page number for which {pageSize} of objects should be retrieved (Default is 1).
     *
     * @var int
     */
    public $pageIndex = 1;

    private static $map_between_objects = array();

    /* (non-PHPdoc)
	 * @see KalturaObject::getMapBetweenObjects()
	 */
    public function getMapBetweenObjects()
    {
        return array_merge(parent::getMapBetweenObjects(), self::$map_between_objects);
    }

    public function toObject($object = null, $skipProperties = array())
    {
        if (!$object)
        {
            $object = new kPager();
        }

        $object->setPageSize($this->calcPageSize());
        $object->setPageIndex($this->calcPageIndex());

        return parent::toObject($object, array('pageSize', 'pageIndex'));
    }

    public function calcPageSize()
    {
        return max(min($this->pageSize, self::MAX_PAGE_SIZE), 0);
    }

    public function calcPageIndex()
    {
        return max(self::MIN_PAGE_INDEX, $this->pageIndex);
    }

    public function calcOffset()
    {
        return ($this->calcPageIndex() - 1) * $this->calcPageSize();
    }

}

{'fraction_non_alphanumeric': 0.11987951807228915, 'fraction_numerical': 0.009036144578313253, 'mean_word_length': 2.288118811881188, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '5879069', 'n_tokens_mistral': 1033, 'n_tokens_neox': 937, 'n_words': 241}