original_string: public function toArray()
      {
          $array = [];
          foreach ($this->array as $hash => $value) {
              $key = $this->hash_to_key($hash);
              if ($this->is_collection_like($value)) {
                  $array[$key] = $this->collection_to_array($value);
              } else {
                  $array[$key] = $value;
              }
          }
          return $array;
      }
code: public function toArray()
      {
          $array = [];
          foreach ($this->array as $hash => $value) {
              $key = $this->hash_to_key($hash);
              if ($this->is_collection_like($value)) {
                  $array[$key] = $this->collection_to_array($value);
              } else {
                  $array[$key] = $value;
              }
          }
          return $array;
      }
code_tokens: public function toArray ( ) { $ array = [ ] ; foreach ( $ this -> array as $ hash => $ value ) { $ key = $ this -> hash_to_key ( $ hash ) ; if ( $ this -> is_collection_like ( $ value ) ) { $ array [ $ key ] = $ this -> collection_to_array ( $ value ) ; } else { $ array [ $ key ] = $ value ; } } return $ array ; }
docstring: Copy this map into an array, recursing as necessary to convert
  contained collections into arrays.
  
  @api
docstring_tokens: Copy this map into an array recursing as necessary to convert contained collections into arrays .