original_string: protected function prepareHandler(HandlerInterface $handler, array $config = [])
      {
          if (! isset($config['formatter'])) {
              $handler->setFormatter($this->formatter());
          } elseif ($config['formatter'] !== 'default') {
              $handler->setFormatter($this->app->make($config['formatter'], $config['formatter_with'] ?? []));
          }
  
          return $handler;
      }
code: protected function prepareHandler(HandlerInterface $handler, array $config = [])
      {
          if (! isset($config['formatter'])) {
              $handler->setFormatter($this->formatter());
          } elseif ($config['formatter'] !== 'default') {
              $handler->setFormatter($this->app->make($config['formatter'], $config['formatter_with'] ?? []));
          }
  
          return $handler;
      }
code_tokens: protected function prepareHandler ( HandlerInterface $ handler , array $ config = [ ] ) { if ( ! isset ( $ config [ 'formatter' ] ) ) { $ handler -> setFormatter ( $ this -> formatter ( ) ) ; } elseif ( $ config [ 'formatter' ] !== 'default' ) { $ handler -> setFormatter ( $ this -> app -> make ( $ config [ 'formatter' ] , $ config [ 'formatter_with' ] ?? [ ] ) ) ; } return $ handler ; }
docstring: Prepare the handler for usage by Monolog.
  
  @param  \Monolog\Handler\HandlerInterface  $handler
  @param  array  $config
  @return \Monolog\Handler\HandlerInterface
docstring_tokens: Prepare the handler for usage by Monolog .