/**
  * Allows the pipeline executor to perform operations on the
  * connection before starting to execute the commands stored
  * in the pipeline.
  *
  * @param ConnectionInterface $connection Connection instance.
  */
 protected function checkConnection(ConnectionInterface $connection)
 {
     if ($connection instanceof ReplicationConnectionInterface) {
         $connection->switchTo('master');
     }
 }