original_string: public function connection(ConnectionInterface $connection = null)
      {
          deprecationWarning(
              get_called_class() . '::connection() is deprecated. ' .
              'Use setConnection()/getConnection() instead.'
          );
          if ($connection !== null) {
              $this->setConnection($connection);
          }
  
          return $this->getConnection();
      }
code: public function connection(ConnectionInterface $connection = null)
      {
          deprecationWarning(
              get_called_class() . '::connection() is deprecated. ' .
              'Use setConnection()/getConnection() instead.'
          );
          if ($connection !== null) {
              $this->setConnection($connection);
          }
  
          return $this->getConnection();
      }
code_tokens: public function connection ( ConnectionInterface $ connection = null ) { deprecationWarning ( get_called_class ( ) . '::connection() is deprecated. ' . 'Use setConnection()/getConnection() instead.' ) ; if ( $ connection !== null ) { $ this -> setConnection ( $ connection ) ; } return $ this -> getConnection ( ) ; }
docstring: Returns the connection instance or sets a new one
  
  @deprecated 3.4.0 Use setConnection()/getConnection() instead.
  @param \Cake\Datasource\ConnectionInterface|null $connection The new connection instance
  @return \Cake\Datasource\ConnectionInterface
docstring_tokens: Returns the connection instance or sets a new one