original_string: private function key_to_hash($key)
      {
          if (null === $key) {
              $hash = 'null';
  
          } else if (is_int($key)) {
              $hash = $key;
  
          } else if (is_float($key)) {
              $hash = "f_$key";
  
          } else if (is_bool($key)) {
              $hash = "b_$key";
  
          } else if (is_string($key)) {
              $hash = "s_$key";
  
          } else if (is_object($key) || is_callable($key)) {
              $hash = spl_object_hash($key);
  
          } else if (is_array($key)) {
              $hash = 'a_' . md5(json_encode($key));
  
          } else if (is_resource($key)) {
              $hash = "r_$key";
  
          } else {
              throw new \InvalidArgumentException(sprintf(
                  'Unsupported key type "%s"',
                  gettype($key)
              ));
          }
  
          $this->map_hash_to_key[$hash] = $key;
          return $hash;
       }
code: private function key_to_hash($key)
      {
          if (null === $key) {
              $hash = 'null';
  
          } else if (is_int($key)) {
              $hash = $key;
  
          } else if (is_float($key)) {
              $hash = "f_$key";
  
          } else if (is_bool($key)) {
              $hash = "b_$key";
  
          } else if (is_string($key)) {
              $hash = "s_$key";
  
          } else if (is_object($key) || is_callable($key)) {
              $hash = spl_object_hash($key);
  
          } else if (is_array($key)) {
              $hash = 'a_' . md5(json_encode($key));
  
          } else if (is_resource($key)) {
              $hash = "r_$key";
  
          } else {
              throw new \InvalidArgumentException(sprintf(
                  'Unsupported key type "%s"',
                  gettype($key)
              ));
          }
  
          $this->map_hash_to_key[$hash] = $key;
          return $hash;
       }
code_tokens: private function key_to_hash ( $ key ) { if ( null === $ key ) { $ hash = 'null' ; } else if ( is_int ( $ key ) ) { $ hash = $ key ; } else if ( is_float ( $ key ) ) { $ hash = "f_$key" ; } else if ( is_bool ( $ key ) ) { $ hash = "b_$key" ; } else if ( is_string ( $ key ) ) { $ hash = "s_$key" ; } else if ( is_object ( $ key ) || is_callable ( $ key ) ) { $ hash = spl_object_hash ( $ key ) ; } else if ( is_array ( $ key ) ) { $ hash = 'a_' . md5 ( json_encode ( $ key ) ) ; } else if ( is_resource ( $ key ) ) { $ hash = "r_$key" ; } else { throw new \ InvalidArgumentException ( sprintf ( 'Unsupported key type "%s"' , gettype ( $ key ) ) ) ; } $ this -> map_hash_to_key [ $ hash ] = $ key ; return $ hash ; }
docstring: Lookup the hash for the given key. If a hash does not yet exist, one is
  created.
  
  @param mixed $key
  @return string
  @throws \InvalidArgumentException
docstring_tokens: Lookup the hash for the given key . If a hash does not yet exist one is created .