original_string: protected function validateComponentPricesOrder()
      {
          $field = 'data.components';
          $components = $this->getSubmitted($field);
  
          if (empty($components)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          $label = $this->translation->text('Price');
  
          if (!is_array($components)) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          foreach ($components as $id => $component) {
  
              if (!is_numeric($component['price'])) {
                  $this->setErrorNumeric("$field.$id", $label);
                  continue;
              }
  
              if (strlen($component['price']) > 10) {
                  $this->setErrorLengthRange("$field.$id", $label, 0, 10);
              }
          }
  
          return !$this->isError('components');
      }
code: protected function validateComponentPricesOrder()
      {
          $field = 'data.components';
          $components = $this->getSubmitted($field);
  
          if (empty($components)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          $label = $this->translation->text('Price');
  
          if (!is_array($components)) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          foreach ($components as $id => $component) {
  
              if (!is_numeric($component['price'])) {
                  $this->setErrorNumeric("$field.$id", $label);
                  continue;
              }
  
              if (strlen($component['price']) > 10) {
                  $this->setErrorLengthRange("$field.$id", $label, 0, 10);
              }
          }
  
          return !$this->isError('components');
      }
code_tokens: protected function validateComponentPricesOrder ( ) { $ field = 'data.components' ; $ components = $ this -> getSubmitted ( $ field ) ; if ( empty ( $ components ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } $ label = $ this -> translation -> text ( 'Price' ) ; if ( ! is_array ( $ components ) ) { $ this -> setErrorInvalid ( $ field , $ label ) ; return false ; } foreach ( $ components as $ id => $ component ) { if ( ! is_numeric ( $ component [ 'price' ] ) ) { $ this -> setErrorNumeric ( "$field.$id" , $ label ) ; continue ; } if ( strlen ( $ component [ 'price' ] ) > 10 ) { $ this -> setErrorLengthRange ( "$field.$id" , $ label , 0 , 10 ) ; } } return ! $ this -> isError ( 'components' ) ; }
docstring: Validates order component prices
  @return bool
docstring_tokens: Validates order component prices