original_string: protected function addFormatter(ServiceContainer $container, $name, $class)
      {
          $container->set(
            'formatter.formatters.' . $name,
            function (ServiceContainer $c) use ($class) {
                $c->set('formatter.presenter', new StringPresenter($c->get('formatter.presenter.differ')));
  
                /** @var ServiceContainer $c */
                return new $class(
                  $c->get('formatter.presenter'),
                  $c->get('console.io'),
                  $c->get('event_dispatcher.listeners.stats')
                );
            }
          );
      }
code: protected function addFormatter(ServiceContainer $container, $name, $class)
      {
          $container->set(
            'formatter.formatters.' . $name,
            function (ServiceContainer $c) use ($class) {
                $c->set('formatter.presenter', new StringPresenter($c->get('formatter.presenter.differ')));
  
                /** @var ServiceContainer $c */
                return new $class(
                  $c->get('formatter.presenter'),
                  $c->get('console.io'),
                  $c->get('event_dispatcher.listeners.stats')
                );
            }
          );
      }
code_tokens: protected function addFormatter ( ServiceContainer $ container , $ name , $ class ) { $ container -> set ( 'formatter.formatters.' . $ name , function ( ServiceContainer $ c ) use ( $ class ) { $ c -> set ( 'formatter.presenter' , new StringPresenter ( $ c -> get ( 'formatter.presenter.differ' ) ) ) ; /** @var ServiceContainer $c */ return new $ class ( $ c -> get ( 'formatter.presenter' ) , $ c -> get ( 'console.io' ) , $ c -> get ( 'event_dispatcher.listeners.stats' ) ) ; } ) ; }
docstring: Add a formatter to the service container
  
  @param ServiceContainer $container
  @param string $name
  @param string $class
docstring_tokens: Add a formatter to the service container