original_string: protected function validateCombinationStockProduct($index, &$combination)
      {
          if (empty($combination['stock'])) {
              return null;
          }
  
          if (!is_numeric($combination['stock']) || strlen($combination['stock']) > 10) {
              $error = $this->translation->text('Only numeric values and no longer than @num characters', array('@num' => 10));
              $this->setError("combination.$index.stock", $error);
          }
  
          return !isset($error);
      }
code: protected function validateCombinationStockProduct($index, &$combination)
      {
          if (empty($combination['stock'])) {
              return null;
          }
  
          if (!is_numeric($combination['stock']) || strlen($combination['stock']) > 10) {
              $error = $this->translation->text('Only numeric values and no longer than @num characters', array('@num' => 10));
              $this->setError("combination.$index.stock", $error);
          }
  
          return !isset($error);
      }
code_tokens: protected function validateCombinationStockProduct ( $ index , & $ combination ) { if ( empty ( $ combination [ 'stock' ] ) ) { return null ; } if ( ! is_numeric ( $ combination [ 'stock' ] ) || strlen ( $ combination [ 'stock' ] ) > 10 ) { $ error = $ this -> translation -> text ( 'Only numeric values and no longer than @num characters' , array ( '@num' => 10 ) ) ; $ this -> setError ( "combination.$index.stock" , $ error ) ; } return ! isset ( $ error ) ; }
docstring: Validates combination stock level
  @param integer $index
  @param array $combination
  @return null|boolean
docstring_tokens: Validates combination stock level