Apply PSR-12 code style (#3886)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / template / EmailTemplateEngine.class.php
index d53d94eea52b0fb25cb1e9ac5945ef61c73baa10..ac63bcb5f0c96d925891147eae3a901223dcb70a 100644 (file)
@@ -1,48 +1,53 @@
 <?php
+
 namespace wcf\system\template;
+
 use wcf\system\WCF;
 
 /**
  * Loads and displays templates in emails.
- * 
- * @author     Tim Duesterhus
- * @copyright  2001-2019 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    WoltLabSuite\Core\System\Template
+ *
+ * @author  Tim Duesterhus
+ * @copyright   2001-2019 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Template
  */
-class EmailTemplateEngine extends TemplateEngine {
-       /**
-        * @inheritDoc
-        */
-       protected $environment = 'email';
-       
-       /**
-        * @inheritDoc
-        */
-       public function getTemplateGroupID() {
-               static $initialized = false;
-               
-               if (!$initialized) {
-                       $sql = "SELECT  templateGroupID
-                               FROM    wcf".WCF_N."_template_group
-                               WHERE   templateGroupFolderName = ?";
-                       $statement = WCF::getDB()->prepareStatement($sql);
-                       $statement->execute(['_wcf_email/']);
-                       
-                       parent::setTemplateGroupID($statement->fetchSingleColumn());
-                       $initialized = true;
-               }
-               
-               return parent::getTemplateGroupID();
-       }
-       
-       /**
-        * This method always throws, because changing the template group is not supported.
-        * 
-        * @param       int             $templateGroupID
-        * @throws      \BadMethodCallException
-        */
-       public function setTemplateGroupID($templateGroupID) {
-               throw new \BadMethodCallException("You may not change the template group of the email template engine");
-       }
+class EmailTemplateEngine extends TemplateEngine
+{
+    /**
+     * @inheritDoc
+     */
+    protected $environment = 'email';
+
+    /**
+     * @inheritDoc
+     */
+    public function getTemplateGroupID()
+    {
+        static $initialized = false;
+
+        if (!$initialized) {
+            $sql = "SELECT  templateGroupID
+                    FROM    wcf" . WCF_N . "_template_group
+                    WHERE   templateGroupFolderName = ?";
+            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement->execute(['_wcf_email/']);
+
+            parent::setTemplateGroupID($statement->fetchSingleColumn());
+            $initialized = true;
+        }
+
+        return parent::getTemplateGroupID();
+    }
+
+    /**
+     * This method always throws, because changing the template group is not supported.
+     *
+     * @param int $templateGroupID
+     * @throws  \BadMethodCallException
+     */
+    public function setTemplateGroupID($templateGroupID)
+    {
+        throw new \BadMethodCallException("You may not change the template group of the email template engine");
+    }
 }