original_string: protected function assertDirectory($directory)
  	{
  		if ( !is_string($directory) || !is_dir($directory) || !file_exists($directory) ) {
  			throw new \InvalidArgumentException('Directory "' . $directory . '" is invalid');
  		}
  
  		return $directory;
  	}
code: protected function assertDirectory($directory)
  	{
  		if ( !is_string($directory) || !is_dir($directory) || !file_exists($directory) ) {
  			throw new \InvalidArgumentException('Directory "' . $directory . '" is invalid');
  		}
  
  		return $directory;
  	}
code_tokens: protected function assertDirectory ( $ directory ) { if ( ! is_string ( $ directory ) || ! is_dir ( $ directory ) || ! file_exists ( $ directory ) ) { throw new \ InvalidArgumentException ( 'Directory "' . $ directory . '" is invalid' ) ; } return $ directory ; }
docstring: Checks that a directory is valid.
  
  @param string $directory Directory.
  
  @throws \InvalidArgumentException When directory is invalid.
  @return string
docstring_tokens: Checks that a directory is valid .