original_string: public function connection($connection = null)
      {
          deprecationWarning(
              'Query::connection() is deprecated. ' .
              'Use Query::setConnection()/getConnection() instead.'
          );
          if ($connection !== null) {
              return $this->setConnection($connection);
          }
  
          return $this->getConnection();
      }
code: public function connection($connection = null)
      {
          deprecationWarning(
              'Query::connection() is deprecated. ' .
              'Use Query::setConnection()/getConnection() instead.'
          );
          if ($connection !== null) {
              return $this->setConnection($connection);
          }
  
          return $this->getConnection();
      }
code_tokens: public function connection ( $ connection = null ) { deprecationWarning ( 'Query::connection() is deprecated. ' . 'Use Query::setConnection()/getConnection() instead.' ) ; if ( $ connection !== null ) { return $ this -> setConnection ( $ connection ) ; } return $ this -> getConnection ( ) ; }
docstring: Sets the connection instance to be used for executing and transforming this query
  When called with a null argument, it will return the current connection instance.
  
  @deprecated 3.4.0 Use setConnection()/getConnection() instead.
  @param \Cake\Database\Connection|null $connection Connection instance
  @return $this|\Cake\Database\Connection
docstring_tokens: Sets the connection instance to be used for executing and transforming this query When called with a null argument it will return the current connection instance .