/**
* 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
* @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';
* @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: >".$nodeName."<<br />\n";
if (($nodeName != $this->getCurrMainNode()) && (in_array($nodeName, $this->getMainNodes()))) {