original_string: public function get_sha1_file() {
          if (empty($this->singlefile) && empty($this->multifiles)) {
              throw new portfolio_caller_exception('invalidsha1file', 'portfolio', $this->get_return_url());
          }
          if ($this->singlefile) {
              return $this->singlefile->get_contenthash();
          }
          $sha1s = array();
          foreach ($this->multifiles as $file) {
              $sha1s[] = $file->get_contenthash();
          }
          asort($sha1s);
          return sha1(implode('', $sha1s));
      }
code: public function get_sha1_file() {
          if (empty($this->singlefile) && empty($this->multifiles)) {
              throw new portfolio_caller_exception('invalidsha1file', 'portfolio', $this->get_return_url());
          }
          if ($this->singlefile) {
              return $this->singlefile->get_contenthash();
          }
          $sha1s = array();
          foreach ($this->multifiles as $file) {
              $sha1s[] = $file->get_contenthash();
          }
          asort($sha1s);
          return sha1(implode('', $sha1s));
      }
code_tokens: public function get_sha1_file ( ) { if ( empty ( $ this -> singlefile ) && empty ( $ this -> multifiles ) ) { throw new portfolio_caller_exception ( 'invalidsha1file' , 'portfolio' , $ this -> get_return_url ( ) ) ; } if ( $ this -> singlefile ) { return $ this -> singlefile -> get_contenthash ( ) ; } $ sha1s = array ( ) ; foreach ( $ this -> multifiles as $ file ) { $ sha1s [ ] = $ file -> get_contenthash ( ) ; } asort ( $ sha1s ) ; return sha1 ( implode ( '' , $ sha1s ) ) ; }
docstring: Helper function to calculate the sha1 for multi or single file exports
  
  @return string sha1 file exports
docstring_tokens: Helper function to calculate the sha1 for multi or single file exports