original_string: protected function combine(array $data, $separator)
      {
          $results = array_shift($data);
          $results = is_array($results) ? $results : [$results];
  
          while ($value = array_shift($data)) {
              if (is_array($value)) {
                  $replacement = [];
  
                  foreach ($value as $array_value) {
                      foreach ($results as $result_value) {
                          $replacement[] = $result_value . $separator . $array_value;
                      }
                  }
  
                  $results = $replacement;
              } else {
                  foreach ($results as $key => $result_value) {
                      $results[$key] = $result_value . $separator . $value;
                  }
              }
          }
  
          return array_filter($results);
      }
code: protected function combine(array $data, $separator)
      {
          $results = array_shift($data);
          $results = is_array($results) ? $results : [$results];
  
          while ($value = array_shift($data)) {
              if (is_array($value)) {
                  $replacement = [];
  
                  foreach ($value as $array_value) {
                      foreach ($results as $result_value) {
                          $replacement[] = $result_value . $separator . $array_value;
                      }
                  }
  
                  $results = $replacement;
              } else {
                  foreach ($results as $key => $result_value) {
                      $results[$key] = $result_value . $separator . $value;
                  }
              }
          }
  
          return array_filter($results);
      }
code_tokens: protected function combine ( array $ data , $ separator ) { $ results = array_shift ( $ data ) ; $ results = is_array ( $ results ) ? $ results : [ $ results ] ; while ( $ value = array_shift ( $ data ) ) { if ( is_array ( $ value ) ) { $ replacement = [ ] ; foreach ( $ value as $ array_value ) { foreach ( $ results as $ result_value ) { $ replacement [ ] = $ result_value . $ separator . $ array_value ; } } $ results = $ replacement ; } else { foreach ( $ results as $ key => $ result_value ) { $ results [ $ key ] = $ result_value . $ separator . $ value ; } } } return array_filter ( $ results ) ; }
docstring: Combine all the data into strings.
  
  For every array in the data all strings will be multiplied by the number of items in that
  array to cover every possible string combination.
  
  @param array $data
  @param string $separator
  
  @return string[]
docstring_tokens: Combine all the data into strings .