original_string: public function addAuthenticationFactory(AuthenticationFactoryInterface $authFactory,
                                               UserProviderInterface $userProvider)
      {
          $id = $authFactory->getId();
  
          $this->authFactories[$id] = array(
              'factory' => $authFactory,
              'userProvider' => $userProvider,
          );
  
          $this->userProviders[] = $userProvider;
  
          if ($this->provider) {
              $this->registerAuthenticationFactory($this->provider->getApp(), $id, $authFactory, $userProvider);
          }
  
          return $this;
      }
code: public function addAuthenticationFactory(AuthenticationFactoryInterface $authFactory,
                                               UserProviderInterface $userProvider)
      {
          $id = $authFactory->getId();
  
          $this->authFactories[$id] = array(
              'factory' => $authFactory,
              'userProvider' => $userProvider,
          );
  
          $this->userProviders[] = $userProvider;
  
          if ($this->provider) {
              $this->registerAuthenticationFactory($this->provider->getApp(), $id, $authFactory, $userProvider);
          }
  
          return $this;
      }
code_tokens: public function addAuthenticationFactory ( AuthenticationFactoryInterface $ authFactory , UserProviderInterface $ userProvider ) { $ id = $ authFactory -> getId ( ) ; $ this -> authFactories [ $ id ] = array ( 'factory' => $ authFactory , 'userProvider' => $ userProvider , ) ; $ this -> userProviders [ ] = $ userProvider ; if ( $ this -> provider ) { $ this -> registerAuthenticationFactory ( $ this -> provider -> getApp ( ) , $ id , $ authFactory , $ userProvider ) ; } return $ this ; }
docstring: Add additional authentication factory and corresponding user provider.
  @param AuthenticationFactoryInterface $authFactory
  @param UserProviderInterface $userProvider
  @return $this Returning $this to allow method chaining
docstring_tokens: Add additional authentication factory and corresponding user provider .