original_string: private static function writeTempFile($data)
      {
          $file = tempnam(sys_get_temp_dir(), self::$temp_file_prefix);
          file_put_contents($file, $data);
  
          register_shutdown_function(function () use ($file) {
              if (file_exists($file)) {
                  unlink($file);
              }
          });
  
          return $file;
      }
code: private static function writeTempFile($data)
      {
          $file = tempnam(sys_get_temp_dir(), self::$temp_file_prefix);
          file_put_contents($file, $data);
  
          register_shutdown_function(function () use ($file) {
              if (file_exists($file)) {
                  unlink($file);
              }
          });
  
          return $file;
      }
code_tokens: private static function writeTempFile ( $ data ) { $ file = tempnam ( sys_get_temp_dir ( ) , self :: $ temp_file_prefix ) ; file_put_contents ( $ file , $ data ) ; register_shutdown_function ( function ( ) use ( $ file ) { if ( file_exists ( $ file ) ) { unlink ( $ file ) ; } } ) ; return $ file ; }
docstring: Create a temporary file to be used and destroyed at shutdown
  
  @param $data
  @return bool|string
docstring_tokens: Create a temporary file to be used and destroyed at shutdown