original_string: public function validateInteger(array $values)
      {
          if (count($values) != 1) {
              $vars = array('@field' => $this->translation->text('Condition'));
              return $this->translation->text('@field has invalid value', $vars);
          }
  
          $value = reset($values);
  
          if (strlen($value) > 10) {
              $vars = array('@max' => 10, '@field' => $this->translation->text('Value'));
              return $this->translation->text('@field must not be longer than @max characters', $vars);
          }
  
          if (ctype_digit($value)) {
              return true;
          }
  
          $vars = array('@field' => $this->translation->text('Condition'));
          return $this->translation->text('@field has invalid value', $vars);
      }
code: public function validateInteger(array $values)
      {
          if (count($values) != 1) {
              $vars = array('@field' => $this->translation->text('Condition'));
              return $this->translation->text('@field has invalid value', $vars);
          }
  
          $value = reset($values);
  
          if (strlen($value) > 10) {
              $vars = array('@max' => 10, '@field' => $this->translation->text('Value'));
              return $this->translation->text('@field must not be longer than @max characters', $vars);
          }
  
          if (ctype_digit($value)) {
              return true;
          }
  
          $vars = array('@field' => $this->translation->text('Condition'));
          return $this->translation->text('@field has invalid value', $vars);
      }
code_tokens: public function validateInteger ( array $ values ) { if ( count ( $ values ) != 1 ) { $ vars = array ( '@field' => $ this -> translation -> text ( 'Condition' ) ) ; return $ this -> translation -> text ( '@field has invalid value' , $ vars ) ; } $ value = reset ( $ values ) ; if ( strlen ( $ value ) > 10 ) { $ vars = array ( '@max' => 10 , '@field' => $ this -> translation -> text ( 'Value' ) ) ; return $ this -> translation -> text ( '@field must not be longer than @max characters' , $ vars ) ; } if ( ctype_digit ( $ value ) ) { return true ; } $ vars = array ( '@field' => $ this -> translation -> text ( 'Condition' ) ) ; return $ this -> translation -> text ( '@field has invalid value' , $ vars ) ; }
docstring: Validates an integer value
  @param array $values
  @return boolean|string
docstring_tokens: Validates an integer value