original_string: protected function decorateFileAttributes($file)
      {
          /*
           * File is protected, create a secure public path
           */
          if (!$file->isPublic()) {
              $path = $thumb = FilesController::getDownloadUrl($file);
  
              if ($this->imageWidth || $this->imageHeight) {
                  $thumb = FilesController::getThumbUrl($file, $this->imageWidth, $this->imageHeight, $this->thumbOptions);
              }
          }
          /*
           * Otherwise use public paths
           */
          else {
              $path = $thumb = $file->getPath();
  
              if ($this->imageWidth || $this->imageHeight) {
                  $thumb = $file->getThumb($this->imageWidth, $this->imageHeight, $this->thumbOptions);
              }
          }
  
          $file->pathUrl = $path;
          $file->thumbUrl = $thumb;
  
          return $file;
      }
code: protected function decorateFileAttributes($file)
      {
          /*
           * File is protected, create a secure public path
           */
          if (!$file->isPublic()) {
              $path = $thumb = FilesController::getDownloadUrl($file);
  
              if ($this->imageWidth || $this->imageHeight) {
                  $thumb = FilesController::getThumbUrl($file, $this->imageWidth, $this->imageHeight, $this->thumbOptions);
              }
          }
          /*
           * Otherwise use public paths
           */
          else {
              $path = $thumb = $file->getPath();
  
              if ($this->imageWidth || $this->imageHeight) {
                  $thumb = $file->getThumb($this->imageWidth, $this->imageHeight, $this->thumbOptions);
              }
          }
  
          $file->pathUrl = $path;
          $file->thumbUrl = $thumb;
  
          return $file;
      }
code_tokens: protected function decorateFileAttributes ( $ file ) { /*
           * File is protected, create a secure public path
           */ if ( ! $ file -> isPublic ( ) ) { $ path = $ thumb = FilesController :: getDownloadUrl ( $ file ) ; if ( $ this -> imageWidth || $ this -> imageHeight ) { $ thumb = FilesController :: getThumbUrl ( $ file , $ this -> imageWidth , $ this -> imageHeight , $ this -> thumbOptions ) ; } } /*
           * Otherwise use public paths
           */ else { $ path = $ thumb = $ file -> getPath ( ) ; if ( $ this -> imageWidth || $ this -> imageHeight ) { $ thumb = $ file -> getThumb ( $ this -> imageWidth , $ this -> imageHeight , $ this -> thumbOptions ) ; } } $ file -> pathUrl = $ path ; $ file -> thumbUrl = $ thumb ; return $ file ; }
docstring: Adds the bespoke attributes used internally by this widget.
  - thumbUrl
  - pathUrl
  @return System\Models\File
docstring_tokens: Adds the bespoke attributes used internally by this widget . - thumbUrl - pathUrl