original_string: public function addProvider($name, ReindexProviderInterface $provider)
      {
          if (isset($this->providers[$name])) {
              throw new \InvalidArgumentException(sprintf(
                  'Reindex provider with name "%s" has already been registered.',
                  $name
              ));
          }
  
          $this->providers[$name] = $provider;
      }
code: public function addProvider($name, ReindexProviderInterface $provider)
      {
          if (isset($this->providers[$name])) {
              throw new \InvalidArgumentException(sprintf(
                  'Reindex provider with name "%s" has already been registered.',
                  $name
              ));
          }
  
          $this->providers[$name] = $provider;
      }
code_tokens: public function addProvider ( $ name , ReindexProviderInterface $ provider ) { if ( isset ( $ this -> providers [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Reindex provider with name "%s" has already been registered.' , $ name ) ) ; } $ this -> providers [ $ name ] = $ provider ; }
docstring: Add a reindex provider to the registry.
  
  @param string $name
  @param ReindexProviderInterface $provider
  
  @throws \InvalidArgumentException
docstring_tokens: Add a reindex provider to the registry .