original_string: public static function create($adapter, array $config = []): self
      {
          if (!isset(self::$adapterMap[$adapter])) {
              throw new DriverNotFoundException(sprintf(
                  'Adapter "%s" not found. You should use one of: %s',
                  $adapter,
                  implode(', ', self::$adapterMap)
              ));
          }
  
          $class = self::$adapterMap[$adapter];
  
          return new self(new $class($config));
      }
code: public static function create($adapter, array $config = []): self
      {
          if (!isset(self::$adapterMap[$adapter])) {
              throw new DriverNotFoundException(sprintf(
                  'Adapter "%s" not found. You should use one of: %s',
                  $adapter,
                  implode(', ', self::$adapterMap)
              ));
          }
  
          $class = self::$adapterMap[$adapter];
  
          return new self(new $class($config));
      }
code_tokens: public static function create ( $ adapter , array $ config = [ ] ) : self { if ( ! isset ( self :: $ adapterMap [ $ adapter ] ) ) { throw new DriverNotFoundException ( sprintf ( 'Adapter "%s" not found. You should use one of: %s' , $ adapter , implode ( ', ' , self :: $ adapterMap ) ) ) ; } $ class = self :: $ adapterMap [ $ adapter ] ; return new self ( new $ class ( $ config ) ) ; }
docstring: Creates a new Ldap instance.
  
  @param string $adapter The adapter name
  @param array  $config  The adapter's configuration
  
  @return static
docstring_tokens: Creates a new Ldap instance .