original_string: protected function getRelatedFieldValues(array $product, array $ids)
      {
          $related = array();
          foreach ($product['combination'] as $combination) {
              if (array_intersect($ids, $combination['fields'])) {
                  $related += $combination['fields'];
              }
          }
  
          return $related;
      }
code: protected function getRelatedFieldValues(array $product, array $ids)
      {
          $related = array();
          foreach ($product['combination'] as $combination) {
              if (array_intersect($ids, $combination['fields'])) {
                  $related += $combination['fields'];
              }
          }
  
          return $related;
      }
code_tokens: protected function getRelatedFieldValues ( array $ product , array $ ids ) { $ related = array ( ) ; foreach ( $ product [ 'combination' ] as $ combination ) { if ( array_intersect ( $ ids , $ combination [ 'fields' ] ) ) { $ related += $ combination [ 'fields' ] ; } } return $ related ; }
docstring: Returns an array of related fields value IDs
  @todo Rethink this. It should return all possible combinations
  @param array $product
  @param array $ids
  @return array
docstring_tokens: Returns an array of related fields value IDs