original_string: protected function _decorateStatement($statement)
      {
          $typeMap = $this->getSelectTypeMap();
          $driver = $this->getConnection()->getDriver();
  
          if ($this->typeCastEnabled && $typeMap->toArray()) {
              $statement = new CallbackStatement($statement, $driver, new FieldTypeConverter($typeMap, $driver));
          }
  
          foreach ($this->_resultDecorators as $f) {
              $statement = new CallbackStatement($statement, $driver, $f);
          }
  
          return $statement;
      }
code: protected function _decorateStatement($statement)
      {
          $typeMap = $this->getSelectTypeMap();
          $driver = $this->getConnection()->getDriver();
  
          if ($this->typeCastEnabled && $typeMap->toArray()) {
              $statement = new CallbackStatement($statement, $driver, new FieldTypeConverter($typeMap, $driver));
          }
  
          foreach ($this->_resultDecorators as $f) {
              $statement = new CallbackStatement($statement, $driver, $f);
          }
  
          return $statement;
      }
code_tokens: protected function _decorateStatement ( $ statement ) { $ typeMap = $ this -> getSelectTypeMap ( ) ; $ driver = $ this -> getConnection ( ) -> getDriver ( ) ; if ( $ this -> typeCastEnabled && $ typeMap -> toArray ( ) ) { $ statement = new CallbackStatement ( $ statement , $ driver , new FieldTypeConverter ( $ typeMap , $ driver ) ) ; } foreach ( $ this -> _resultDecorators as $ f ) { $ statement = new CallbackStatement ( $ statement , $ driver , $ f ) ; } return $ statement ; }
docstring: Auxiliary function used to wrap the original statement from the driver with
  any registered callbacks.
  
  @param \Cake\Database\StatementInterface $statement to be decorated
  @return \Cake\Database\Statement\CallbackStatement
docstring_tokens: Auxiliary function used to wrap the original statement from the driver with any registered callbacks .