original_string: protected function setPdoForType(Connection $connection, $type = null)
      {
          if ($type == 'read') {
              $connection->setPdo($connection->getReadPdo());
          } else if ($type == 'write') {
              $connection->setReadPdo($connection->getPdo());
          }
  
          return $connection;
      }
code: protected function setPdoForType(Connection $connection, $type = null)
      {
          if ($type == 'read') {
              $connection->setPdo($connection->getReadPdo());
          } else if ($type == 'write') {
              $connection->setReadPdo($connection->getPdo());
          }
  
          return $connection;
      }
code_tokens: protected function setPdoForType ( Connection $ connection , $ type = null ) { if ( $ type == 'read' ) { $ connection -> setPdo ( $ connection -> getReadPdo ( ) ) ; } else if ( $ type == 'write' ) { $ connection -> setReadPdo ( $ connection -> getPdo ( ) ) ; } return $ connection ; }
docstring: Prepare the read write mode for database connection instance.
  
  @param  \Nova\Database\Connection  $connection
  @param  string  $type
  @return \Nova\Database\Connection
docstring_tokens: Prepare the read write mode for database connection instance .