original_string: public function processQueue(Model $instance, $path = null, bool $cleanup = true)
      {
          $this->setInstance($instance);
  
          // Determine the path to use
          $path = $path ?: $this->getQueuedFilePath();
  
          // Set the file for processing
          $this->addUploadedFile($path);
  
          // Start processing the file
          $this->save();
  
          // Save all updated model attributes
          $this->getInstance()->save();
  
          // TODO: also remove non-local files
          // Remove queued file locally
          if ($cleanup === true && realpath($path) !== false) {
              @unlink($path);
              @rmdir(dirname($path));
          }
      }
code: public function processQueue(Model $instance, $path = null, bool $cleanup = true)
      {
          $this->setInstance($instance);
  
          // Determine the path to use
          $path = $path ?: $this->getQueuedFilePath();
  
          // Set the file for processing
          $this->addUploadedFile($path);
  
          // Start processing the file
          $this->save();
  
          // Save all updated model attributes
          $this->getInstance()->save();
  
          // TODO: also remove non-local files
          // Remove queued file locally
          if ($cleanup === true && realpath($path) !== false) {
              @unlink($path);
              @rmdir(dirname($path));
          }
      }
code_tokens: public function processQueue ( Model $ instance , $ path = null , bool $ cleanup = true ) { $ this -> setInstance ( $ instance ) ; // Determine the path to use $ path = $ path ? : $ this -> getQueuedFilePath ( ) ; // Set the file for processing $ this -> addUploadedFile ( $ path ) ; // Start processing the file $ this -> save ( ) ; // Save all updated model attributes $ this -> getInstance ( ) -> save ( ) ; // TODO: also remove non-local files // Remove queued file locally if ( $ cleanup === true && realpath ( $ path ) !== false ) { @ unlink ( $ path ) ; @ rmdir ( dirname ( $ path ) ) ; } }
docstring: Trigger queued files for processing.
  
  @param Model  $instance
  @param string $path
  @param bool   $cleanup
  
  @return void
docstring_tokens: Trigger queued files for processing .