INFRA-132 - Put "else" and "catch" on new line
[civicrm-core.git] / CRM / Core / Smarty.php
index 39630c1119f6236cb89ae5b678e70b942f09222a..caf5925d5dc97c3ad7172bfe5f8e675f399f6a08 100644 (file)
@@ -87,7 +87,7 @@ class CRM_Core_Smarty extends Smarty {
     parent::__construct();
   }
 
-  private function initialize( ) {
+  private function initialize() {
     $config = CRM_Core_Config::singleton();
 
     if (isset($config->customTemplateDir) && $config->customTemplateDir) {
@@ -192,7 +192,7 @@ class CRM_Core_Smarty extends Smarty {
    * @param string $resource_name
    * @param string $cache_id
    * @param string $compile_id
-   * @param boolean $display
+   * @param bool $display
    *
    * @return bool|mixed|string
    */
@@ -212,7 +212,8 @@ class CRM_Core_Smarty extends Smarty {
    * Fetch a template (while using certain variables)
    *
    * @param string $resource_name
-   * @param array $vars (string $name => mixed $value) variables to export to Smarty
+   * @param array $vars
+   *   (string $name => mixed $value) variables to export to Smarty.
    * @throws Exception
    * @return bool|mixed|string
    */
@@ -220,7 +221,8 @@ class CRM_Core_Smarty extends Smarty {
     $this->pushScope($vars);
     try {
       $result = $this->fetch($resource_name);
-    } catch (Exception $e) {
+    }
+    catch (Exception $e) {
       // simulate try { ... } finally { ... }
       $this->popScope();
       throw $e;
@@ -265,7 +267,8 @@ class CRM_Core_Smarty extends Smarty {
   public function addTemplateDir($path) {
     if ( is_array( $this->template_dir ) ) {
       array_unshift( $this->template_dir, $path );
-    } else {
+    }
+    else {
       $this->template_dir = array( $path, $this->template_dir );
     }
 
@@ -283,7 +286,8 @@ class CRM_Core_Smarty extends Smarty {
    * $smarty->popScope();
    * @endcode
    *
-   * @param array $vars (string $name => mixed $value)
+   * @param array $vars
+   *   (string $name => mixed $value).
    * @return CRM_Core_Smarty
    * @see popScope
    */
@@ -312,7 +316,8 @@ class CRM_Core_Smarty extends Smarty {
   }
 
   /**
-   * @param array $vars (string $name => mixed $value)
+   * @param array $vars
+   *   (string $name => mixed $value).
    * @return CRM_Core_Smarty
    */
   public function assignAll($vars) {
@@ -322,4 +327,3 @@ class CRM_Core_Smarty extends Smarty {
     return $this;
   }
 }
-