original_string: public function toArray($recursive = true)
      {
          $values = $this->values;
  
          if (!$recursive) {
              return $values;
          }
  
          foreach ($values as $key => $value) {
              if (gettype($value) === 'object') {
                  if ($value instanceof Hash) {
                      $value = $value->toArray($recursive);
                  }
              }
  
              $values[$key] = $value;
          }
  
          return $values;
      }
code: public function toArray($recursive = true)
      {
          $values = $this->values;
  
          if (!$recursive) {
              return $values;
          }
  
          foreach ($values as $key => $value) {
              if (gettype($value) === 'object') {
                  if ($value instanceof Hash) {
                      $value = $value->toArray($recursive);
                  }
              }
  
              $values[$key] = $value;
          }
  
          return $values;
      }
code_tokens: public function toArray ( $ recursive = true ) { $ values = $ this -> values ; if ( ! $ recursive ) { return $ values ; } foreach ( $ values as $ key => $ value ) { if ( gettype ( $ value ) === 'object' ) { if ( $ value instanceof Hash ) { $ value = $ value -> toArray ( $ recursive ) ; } } $ values [ $ key ] = $ value ; } return $ values ; }
docstring: Converts hash to array
  @param  boolean $recursive defaults to true
  @return array
docstring_tokens: Converts hash to array