<commit_before><?php
$pagination_custom_page_size = $this->configuration->getValue('get.pagination_custom_page_size');
$max_items = $this->configuration->getValue('get.max_items');
?>
  /**
   * Returns the list of pagination validators
   * @return  array  an array of validators
   */
  protected function getPaginationValidators()
  {
    $validators = array();
    $validators['page'] = new sfValidatorInteger(array('min' => 1, 'required' => false));
<?php if ($pagination_custom_page_size && ($max_items > 0)): ?>
    $validators['page_size'] = new sfValidatorInteger(array(
      'min' => 1,
      'max' => <?php echo $max_items ?>,
      'required' => false
    ));
<?php endif; ?>
    return $validators;
  }<commit_msg>Add page_size validator even if get.max_items is not set<commit_after><?php
$pagination_custom_page_size = $this->configuration->getValue('get.pagination_custom_page_size');
$max_items = $this->configuration->getValue('get.max_items');
?>
  /**
   * Returns the list of pagination validators
   * @return  array  an array of validators
   */
  protected function getPaginationValidators()
  {
    $validators = array();
    $validators['page'] = new sfValidatorInteger(array('min' => 1, 'required' => false));
<?php if ($pagination_custom_page_size): ?>
    $validators['page_size'] = new sfValidatorInteger(array(
      'min' => 1,
<?php if ($max_items > 0): ?>
      'max' => <?php echo $max_items ?>,
<?php endif; ?>
      'required' => false
    ));
<?php endif; ?>
    return $validators;
  }
{'fraction_non_alphanumeric': 0.16459016393442624, 'fraction_numerical': 0.003934426229508197, 'mean_word_length': 4.3543859649122805, 'pattern_counts': {'":': 0, '<': 13, '<?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': '7395006', 'n_tokens_mistral': 488, 'n_tokens_neox': 481, 'n_words': 108}