original_string: public static function create(array $config, $signer = null)
      {
          if (null === $signer) {
              $signer = new HmacSha1Signer();
          }
  
          if (! $signer instanceof SignerInterface) {
              throw new InvalidArgumentException('The signer must implement the \Risan\OAuth1\Signature\SignerInterface.');
          }
  
          $configFactory = new ConfigFactory();
  
          $protocolParameter = new ProtocolParameter(
              $configFactory->createFromArray($config),
              $signer,
              new NonceGenerator()
          );
  
          $authorizationHeader = new AuthorizationHeader($protocolParameter);
  
          $requestFactory = new RequestFactory($authorizationHeader, new UriParser());
  
          return new OAuth1(new HttpClient(), $requestFactory, new CredentialsFactory());
      }
code: public static function create(array $config, $signer = null)
      {
          if (null === $signer) {
              $signer = new HmacSha1Signer();
          }
  
          if (! $signer instanceof SignerInterface) {
              throw new InvalidArgumentException('The signer must implement the \Risan\OAuth1\Signature\SignerInterface.');
          }
  
          $configFactory = new ConfigFactory();
  
          $protocolParameter = new ProtocolParameter(
              $configFactory->createFromArray($config),
              $signer,
              new NonceGenerator()
          );
  
          $authorizationHeader = new AuthorizationHeader($protocolParameter);
  
          $requestFactory = new RequestFactory($authorizationHeader, new UriParser());
  
          return new OAuth1(new HttpClient(), $requestFactory, new CredentialsFactory());
      }
code_tokens: public static function create ( array $ config , $ signer = null ) { if ( null === $ signer ) { $ signer = new HmacSha1Signer ( ) ; } if ( ! $ signer instanceof SignerInterface ) { throw new InvalidArgumentException ( 'The signer must implement the \Risan\OAuth1\Signature\SignerInterface.' ) ; } $ configFactory = new ConfigFactory ( ) ; $ protocolParameter = new ProtocolParameter ( $ configFactory -> createFromArray ( $ config ) , $ signer , new NonceGenerator ( ) ) ; $ authorizationHeader = new AuthorizationHeader ( $ protocolParameter ) ; $ requestFactory = new RequestFactory ( $ authorizationHeader , new UriParser ( ) ) ; return new OAuth1 ( new HttpClient ( ) , $ requestFactory , new CredentialsFactory ( ) ) ; }
docstring: Create the new OAuth1Interface instance.
  
  @param array                                        $config
  @param \Risan\OAuth1\Signature\SignerInterface|null $signer
  
  @return \Risan\OAuth1\OAuth1Interface
docstring_tokens: Create the new OAuth1Interface instance .