original_string: public function getFiles($request_id, $dest_path = null, $type = null)
      {
          if ($dest_path) { // file stream
              $response = $this->rest->get(
                  static::SIGNATURE_REQUEST_FILES_PATH . '/' . $request_id,
                  $type ? array('file_type' => $type) : null
              );
              $this->checkResponse($response, false);
              file_put_contents($dest_path, $response);
          } else { // link
              $response = $this->rest->get(
                  static::SIGNATURE_REQUEST_FILES_PATH . '/' . $request_id,
                  array('get_url' => true)
              );
  
              return new FileResponse($response);
          }
  
          return $response;
      }
code: public function getFiles($request_id, $dest_path = null, $type = null)
      {
          if ($dest_path) { // file stream
              $response = $this->rest->get(
                  static::SIGNATURE_REQUEST_FILES_PATH . '/' . $request_id,
                  $type ? array('file_type' => $type) : null
              );
              $this->checkResponse($response, false);
              file_put_contents($dest_path, $response);
          } else { // link
              $response = $this->rest->get(
                  static::SIGNATURE_REQUEST_FILES_PATH . '/' . $request_id,
                  array('get_url' => true)
              );
  
              return new FileResponse($response);
          }
  
          return $response;
      }
code_tokens: public function getFiles ( $ request_id , $ dest_path = null , $ type = null ) { if ( $ dest_path ) { // file stream $ response = $ this -> rest -> get ( static :: SIGNATURE_REQUEST_FILES_PATH . '/' . $ request_id , $ type ? array ( 'file_type' => $ type ) : null ) ; $ this -> checkResponse ( $ response , false ) ; file_put_contents ( $ dest_path , $ response ) ; } else { // link $ response = $ this -> rest -> get ( static :: SIGNATURE_REQUEST_FILES_PATH . '/' . $ request_id , array ( 'get_url' => true ) ) ; return new FileResponse ( $ response ) ; } return $ response ; }
docstring: Retrieves a link or copy of the files associated with a signature request
  
  @param  string $request_id
  @param  string $dest_path (optional) where should the file be saved. Will retrieve link if empty.
  @param  string $type (optional) get the files as a single pdf or a zip of many. Links will always be pdfs.
  @return string
  @throws BaseException
docstring_tokens: Retrieves a link or copy of the files associated with a signature request