original_string: protected function getFormatter(array $config)
      {
          if (isset($config['formatter'])) {
              if (!$config['formatter'] instanceof FormatterInterface) {
                  throw new \DomainException(
                      'formatter must implement ' . __NAMESPACE__ . '\FormatterInterface',
                      self::ERR_FORMATTER_INVALID
                  );
              }
              return $config['formatter'];
          }
          return new DefaultFormatter;
      }
code: protected function getFormatter(array $config)
      {
          if (isset($config['formatter'])) {
              if (!$config['formatter'] instanceof FormatterInterface) {
                  throw new \DomainException(
                      'formatter must implement ' . __NAMESPACE__ . '\FormatterInterface',
                      self::ERR_FORMATTER_INVALID
                  );
              }
              return $config['formatter'];
          }
          return new DefaultFormatter;
      }
code_tokens: protected function getFormatter ( array $ config ) { if ( isset ( $ config [ 'formatter' ] ) ) { if ( ! $ config [ 'formatter' ] instanceof FormatterInterface ) { throw new \ DomainException ( 'formatter must implement ' . __NAMESPACE__ . '\FormatterInterface' , self :: ERR_FORMATTER_INVALID ) ; } return $ config [ 'formatter' ] ; } return new DefaultFormatter ; }
docstring: Extracts the feed item formatter from configuration.
  
  @param array $config
  @return \Phergie\Irc\Plugin\React\FeedTicker\FormatterInterface
  @throws \DomainException if formatter setting is invalid
docstring_tokens: Extracts the feed item formatter from configuration .