Merge pull request #6036 from mallezie/16629
[civicrm-core.git] / CRM / Core / CodeGen / Util / Template.php
index 89985d1af9e778dfdecbfe882018d7825ee6e292..2590301c347a96d78a74e78a7ed1914e18622dd8 100644 (file)
@@ -39,8 +39,10 @@ class CRM_Core_CodeGen_Util_Template {
   }
 
   /**
-   * @param array $inputs template filenames
-   * @param string $outpath full path to the desired output file
+   * @param array $inputs
+   *   Template filenames.
+   * @param string $outpath
+   *   Full path to the desired output file.
    */
   public function runConcat($inputs, $outpath) {
     if (file_exists($outpath)) {
@@ -48,13 +50,15 @@ class CRM_Core_CodeGen_Util_Template {
     }
     foreach ($inputs as $infile) {
       // FIXME: does not beautify.  Document.
-      file_put_contents($outpath, $this->smarty->fetch($infile) ."\n", FILE_APPEND);
+      file_put_contents($outpath, $this->smarty->fetch($infile) . "\n", FILE_APPEND);
     }
   }
 
   /**
-   * @param string $infile filename of the template, without a path
-   * @param string $outpath full path to the desired output file
+   * @param string $infile
+   *   Filename of the template, without a path.
+   * @param string $outpath
+   *   Full path to the desired output file.
    */
   public function run($infile, $outpath) {
     $renderedContents = $this->smarty->fetch($infile);
@@ -64,7 +68,8 @@ class CRM_Core_CodeGen_Util_Template {
       $this->beautifier->setOutputFile($outpath);
       $this->beautifier->process();
       $this->beautifier->save();
-    } else {
+    }
+    else {
       file_put_contents($outpath, $renderedContents);
     }
   }
@@ -78,11 +83,12 @@ class CRM_Core_CodeGen_Util_Template {
   }
 
   /**
-   * Clear the smarty cache and assign default values
+   * Clear the smarty cache and assign default values.
    * FIXME: unused cos we no longer do evil singleton magick
    */
   protected function reset() {
     $this->smarty->clear_all_assign();
     $this->smarty->clear_all_cache();
   }
+
 }