]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/template/mail/class_MailTemplateEngine.php
Refacuring:
[core.git] / framework / main / classes / template / mail / class_MailTemplateEngine.php
index 24261f747c8badfb8f63a3220d040b1dcc91dc52..7406248eabd35166aabc0d318d88d9c9a80f3da8 100644 (file)
@@ -43,19 +43,19 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
        /**
         * Main nodes in the XML tree
         */
-       private $mainNodes = array(
+       private $mainNodes = [
                'mail-data'
-       );
+       ];
 
        /**
         * Sub nodes in the XML tree
         */
-       private $subNodes = array(
+       private $subNodes = [
                'subject-line',
                'sender-address',
                'recipient-address',
                'message'
-       );
+       ];
 
        /**
         * Mailer instance
@@ -168,7 +168,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @return      void
         * @throws      InvalidXmlNodeException         If an unknown/invalid XML node name was found
         */
-       public function startElement ($resource, $element, array $attributes) {
+       public function startElement ($resource, string $element, array $attributes) {
                // Initial method name which will never be called...
                $methodName = 'initEmail';
 
@@ -201,10 +201,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @return      void
         * @throws      XmlNodeMismatchException        If current main node mismatches the closing one
         */
-       public function finishElement ($resource, $nodeName) {
-               // Make all lower-case
-               $nodeName = strtolower($nodeName);
-
+       public function finishElement ($resource, string $nodeName) {
                // Does this match with current main node?
                //* DEBUG: */ echo "END: &gt;".$nodeName."&lt;<br />\n";
                if (($nodeName != $this->getCurrMainNode()) && (in_array($nodeName, $this->getMainNodes()))) {