original_string: public function dispatchToQueue($command)
      {
          $connection = $command->connection ?? null;
  
          $queue = call_user_func($this->queueResolver, $connection);
  
          if (! $queue instanceof Queue) {
              throw new RuntimeException('Queue resolver did not return a Queue implementation.');
          }
  
          if (method_exists($command, 'queue')) {
              return $command->queue($queue, $command);
          }
  
          return $this->pushCommandToQueue($queue, $command);
      }
code: public function dispatchToQueue($command)
      {
          $connection = $command->connection ?? null;
  
          $queue = call_user_func($this->queueResolver, $connection);
  
          if (! $queue instanceof Queue) {
              throw new RuntimeException('Queue resolver did not return a Queue implementation.');
          }
  
          if (method_exists($command, 'queue')) {
              return $command->queue($queue, $command);
          }
  
          return $this->pushCommandToQueue($queue, $command);
      }
code_tokens: public function dispatchToQueue ( $ command ) { $ connection = $ command -> connection ?? null ; $ queue = call_user_func ( $ this -> queueResolver , $ connection ) ; if ( ! $ queue instanceof Queue ) { throw new RuntimeException ( 'Queue resolver did not return a Queue implementation.' ) ; } if ( method_exists ( $ command , 'queue' ) ) { return $ command -> queue ( $ queue , $ command ) ; } return $ this -> pushCommandToQueue ( $ queue , $ command ) ; }
docstring: Dispatch a command to its appropriate handler behind a queue.
  
  @param  mixed  $command
  @return mixed
  
  @throws \RuntimeException
docstring_tokens: Dispatch a command to its appropriate handler behind a queue .