original_string: public function has($key)
      {
          if (null === $key) {
              throw new Exception\InvalidArgumentException('The specified key name is null');
          }
  
          if (!is_scalar($key)) {
              throw new Exception\InvalidArgumentException('The specified key name must be a scalar');
          }
  
          return array_key_exists($key, $this->collections);
      }
code: public function has($key)
      {
          if (null === $key) {
              throw new Exception\InvalidArgumentException('The specified key name is null');
          }
  
          if (!is_scalar($key)) {
              throw new Exception\InvalidArgumentException('The specified key name must be a scalar');
          }
  
          return array_key_exists($key, $this->collections);
      }
code_tokens: public function has ( $ key ) { if ( null === $ key ) { throw new Exception \ InvalidArgumentException ( 'The specified key name is null' ) ; } if ( ! is_scalar ( $ key ) ) { throw new Exception \ InvalidArgumentException ( 'The specified key name must be a scalar' ) ; } return array_key_exists ( $ key , $ this -> collections ) ; }
docstring: Whether this contains the given name. More formally, returns true if and only if this contains at least
  one element.
  
  @param string|int $key
  
  @return bool
  @throws \Xloit\Collection\Exception\InvalidArgumentException
docstring_tokens: Whether this contains the given name . More formally returns true if and only if this contains at least one element .