original_string: protected function _renameAndMove(Model $model, File $file, array $options) {
          $nameCallback = null;
  
          if ($options['nameCallback'] && method_exists($model, $options['nameCallback'])) {
              $nameCallback = array($model, $options['nameCallback']);
          }
  
          if ($options['uploadDir']) {
              $file->move($options['uploadDir'], $options['overwrite']);
          }
  
          $file->rename($nameCallback, $options['append'], $options['prepend'], $options['overwrite']);
  
          return (string) $options['finalPath'] . $file->basename();
      }
code: protected function _renameAndMove(Model $model, File $file, array $options) {
          $nameCallback = null;
  
          if ($options['nameCallback'] && method_exists($model, $options['nameCallback'])) {
              $nameCallback = array($model, $options['nameCallback']);
          }
  
          if ($options['uploadDir']) {
              $file->move($options['uploadDir'], $options['overwrite']);
          }
  
          $file->rename($nameCallback, $options['append'], $options['prepend'], $options['overwrite']);
  
          return (string) $options['finalPath'] . $file->basename();
      }
code_tokens: protected function _renameAndMove ( Model $ model , File $ file , array $ options ) { $ nameCallback = null ; if ( $ options [ 'nameCallback' ] && method_exists ( $ model , $ options [ 'nameCallback' ] ) ) { $ nameCallback = array ( $ model , $ options [ 'nameCallback' ] ) ; } if ( $ options [ 'uploadDir' ] ) { $ file -> move ( $ options [ 'uploadDir' ] , $ options [ 'overwrite' ] ) ; } $ file -> rename ( $ nameCallback , $ options [ 'append' ] , $ options [ 'prepend' ] , $ options [ 'overwrite' ] ) ; return ( string ) $ options [ 'finalPath' ] . $ file -> basename ( ) ; }
docstring: Rename or move the file and return its relative path.
  
  @param Model $model
  @param \Transit\File $file
  @param array $options
  @return string
docstring_tokens: Rename or move the file and return its relative path .