diff --git a/src/Forms/HTMLEditor/HTMLEditorSanitiser.php b/src/Forms/HTMLEditor/HTMLEditorSanitiser.php
index ca4e5f407..4d192c66d 100644
--- a/src/Forms/HTMLEditor/HTMLEditorSanitiser.php
+++ b/src/Forms/HTMLEditor/HTMLEditorSanitiser.php
@@ -114,8 +114,8 @@ class HTMLEditorSanitiser
if ($attrType === '!') {
$element->attributesRequired[] = $attrName;
$attr->required = true;
- } // Denied from global
- elseif ($attrType === '-') {
+ } elseif ($attrType === '-') {
+ // Denied from global
unset($element->attributes[$attrName]);
continue;
}
@@ -126,12 +126,12 @@ class HTMLEditorSanitiser
if ($prefix === '=') {
$element->attributesDefault[$attrName] = $value;
$attr->defaultValue = $value;
- } // Forced value
- elseif ($prefix === ':') {
+ } elseif ($prefix === ':') {
+ // Forced value
$element->attributesForced[$attrName] = $value;
$attr->forcedValue = $value;
- } // Required values
- elseif ($prefix === '<') {
+ } elseif ($prefix === '<') {
+ // Required values
$attr->validValues = explode('?', $value);
}
}
@@ -290,8 +290,8 @@ class HTMLEditorSanitiser
// If it's a script or style, we don't keep contents
if ($el->tagName === 'script' || $el->tagName === 'style') {
$el->parentNode->removeChild($el);
- } // Otherwise we replace this node with all it's children
- else {
+ } else {
+ // Otherwise we replace this node with all it's children
// First, create a new fragment with all of $el's children moved into it
$frag = $doc->createDocumentFragment();
while ($el->firstChild) {
@@ -301,8 +301,8 @@ class HTMLEditorSanitiser
// Then replace $el with the frags contents (which used to be it's children)
$el->parentNode->replaceChild($frag, $el);
}
- } // Otherwise tidy the element
- else {
+ } else {
+ // Otherwise tidy the element
// First, if we're supposed to pad & this element is empty, fix that
if ($elementRule->paddEmpty && !$el->firstChild) {
$el->nodeValue = ' ';
diff --git a/src/ORM/Queries/SQLSelect.php b/src/ORM/Queries/SQLSelect.php
index 8eef054e4..971a12422 100644
--- a/src/ORM/Queries/SQLSelect.php
+++ b/src/ORM/Queries/SQLSelect.php
@@ -622,8 +622,8 @@ class SQLSelect extends SQLConditionalExpression
if (!empty($this->having)) {
$records = $this->execute();
return $records->numRecords();
- } // Choose a default column
- elseif ($column == null) {
+ } elseif ($column == null) {
+ // Choose a default column
if ($this->groupby) {
$column = 'DISTINCT ' . implode(", ", $this->groupby);
} else {
diff --git a/src/View/Parsers/ShortcodeParser.php b/src/View/Parsers/ShortcodeParser.php
index 37be5c631..146abb7b1 100644
--- a/src/View/Parsers/ShortcodeParser.php
+++ b/src/View/Parsers/ShortcodeParser.php
@@ -573,8 +573,8 @@ class ShortcodeParser
} elseif ($location == self::AFTER) {
// Move after block parent
$this->insertAfter($node, $parent);
- } // Split parent at node
- elseif ($location == self::SPLIT) {
+ } elseif ($location == self::SPLIT) {
+ // Split parent at node
$at = $node;
$splitee = $node->parentNode;
@@ -593,8 +593,8 @@ class ShortcodeParser
}
$this->insertAfter($node, $parent);
- } // Do nothing
- elseif ($location == self::INLINE) {
+ } elseif ($location == self::INLINE) {
+ // Do nothing
if (in_array(strtolower($node->tagName), self::$block_level_elements)) {
user_error(
'Requested to insert block tag ' . $node->tagName . ' inline - probably this will break HTML compliance',
@@ -646,11 +646,11 @@ class ShortcodeParser
// If no shortcodes defined, don't try and parse any
if (!$this->shortcodes) {
$continue = false;
- } // If no content, don't try and parse it
- elseif (!trim($content)) {
+ } elseif (!trim($content)) {
+ // If no content, don't try and parse it
$continue = false;
- } // If no shortcode tag, don't try and parse it
- elseif (strpos($content, '[') === false) {
+ } elseif (strpos($content, '[') === false) {
+ // If no shortcode tag, don't try and parse it
$continue = false;
}