original_string: protected function flattenArray(array $values, $previous = '')
      {
          $result = array();
          foreach ($values as $key => $value) {
              if ($previous) {
                  $key = $previous.'['.$key.']';
              }
              if (is_array($value)) {
                  $result = $result + $this->flattenArray($value, $key);
              } else {
                  $result[$key] = $value;
              }
          }
  
          return $result;
      }
code: protected function flattenArray(array $values, $previous = '')
      {
          $result = array();
          foreach ($values as $key => $value) {
              if ($previous) {
                  $key = $previous.'['.$key.']';
              }
              if (is_array($value)) {
                  $result = $result + $this->flattenArray($value, $key);
              } else {
                  $result[$key] = $value;
              }
          }
  
          return $result;
      }
code_tokens: protected function flattenArray ( array $ values , $ previous = '' ) { $ result = array ( ) ; foreach ( $ values as $ key => $ value ) { if ( $ previous ) { $ key = $ previous . '[' . $ key . ']' ; } if ( is_array ( $ value ) ) { $ result = $ result + $ this -> flattenArray ( $ value , $ key ) ; } else { $ result [ $ key ] = $ value ; } } return $ result ; }
docstring: Flatten a multidimensional array into a one-dimensional array, using
  square brackets to show the structure of the original array.
docstring_tokens: Flatten a multidimensional array into a one - dimensional array using square brackets to show the structure of the original array .