original_string: public function saveTemporary()
      {
          $this->applyFilters();
  
          if (!$this->hasTranslations() || !$this->isValid()) {
              throw new Exception('unable to save empty or invalid translations');
          }
  
          $path = $this->getTemporaryTranslationPath();
  
          Filesystem::mkdir(dirname($path));
  
          return file_put_contents($path, $this->__toString());
      }
code: public function saveTemporary()
      {
          $this->applyFilters();
  
          if (!$this->hasTranslations() || !$this->isValid()) {
              throw new Exception('unable to save empty or invalid translations');
          }
  
          $path = $this->getTemporaryTranslationPath();
  
          Filesystem::mkdir(dirname($path));
  
          return file_put_contents($path, $this->__toString());
      }
code_tokens: public function saveTemporary ( ) { $ this -> applyFilters ( ) ; if ( ! $ this -> hasTranslations ( ) || ! $ this -> isValid ( ) ) { throw new Exception ( 'unable to save empty or invalid translations' ) ; } $ path = $ this -> getTemporaryTranslationPath ( ) ; Filesystem :: mkdir ( dirname ( $ path ) ) ; return file_put_contents ( $ path , $ this -> __toString ( ) ) ; }
docstring: Save translations to  temporary file; translations should already be cleansed.
  
  @throws \Exception
  @return bool|int False if failure, or number of bytes written
docstring_tokens: Save translations to temporary file ; translations should already be cleansed .