Completed
Push — master ( 409692...b7c30d )
by Richard
02:24
created
src/Formatter/Date.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	/** Converts $val into a \DateTime object if it's not already */
17 17
 	private function getDate($val) {
18 18
 		$tz = new \DateTimeZone($this->locale['timezone']);
19
-		$date =  $val instanceof \DateTimeInterface ? $val : new \DateTime($val, $tz);
19
+		$date = $val instanceof \DateTimeInterface ? $val : new \DateTime($val, $tz);
20 20
 		$date->setTimeZone($tz);
21 21
 		return $date;
22 22
 	}
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
 	/** Formats \DateTime as Date and Time using formats from $locale */
37 37
 	public function dateTime($val) {
38
-		return $this->date($val, $this->locale['date_format'] . ' ' . $this->locale['time_format']);
38
+		return $this->date($val, $this->locale['date_format'].' '.$this->locale['time_format']);
39 39
 	}
40 40
 
41 41
 	/** Generates relative time offsets based on system clock. e.g "10 minutes ago" or "In 6 months"
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		$diff = $now->diff($date);
48 48
 
49 49
 
50
-		$diffDays = $diff->invert === 1 ? $diff->days : 0- $diff->days;
50
+		$diffDays = $diff->invert === 1 ? $diff->days : 0-$diff->days;
51 51
 
52 52
 		if ($diffDays !== 0) return $this->dayOffset($diffDays);
53 53
 		else return $this->timeOffset($diff);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 	/** Gets date ranges to represent uses of weeks/months/days/etc */
77 77
 	private function getRanges($strings) {
78
-		$ranges =  [
78
+		$ranges = [
79 79
 			[1, 1, $strings['yesterday'], 1, ''],
80 80
 			[1, 13, $strings['past'], 1, 'days'],
81 81
 			[13, 28, $strings['past'], 7, 'weeks'],
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 	/** Converts "week" to "weeks", "month" to "months" etc when plural is required using language from $locale */
96 96
 	private function getPlural($strings, $num, $interval) {
97
-		if ($interval !== '') return $num == 1 ? $strings[$interval . '_singular'] : $strings[$interval . '_plural'];
97
+		if ($interval !== '') return $num == 1 ? $strings[$interval.'_singular'] : $strings[$interval.'_plural'];
98 98
 		else return '';
99 99
 	}
100 100
 
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,10 +92,10 @@
 block discarded – undo
92 92
 		return $ranges;
93 93
 	}
94 94
 
95
-    private function add2DayRanges(&$ranges, $property, $when) {
96
-        $rangeVal = $when === "before" ? 2 : -2;
97
-        array_unshift($ranges, [$rangeVal, $rangeVal, $property, 1, '']);
98
-    }
95
+	private function add2DayRanges(&$ranges, $property, $when) {
96
+		$rangeVal = $when === "before" ? 2 : -2;
97
+		array_unshift($ranges, [$rangeVal, $rangeVal, $property, 1, '']);
98
+	}
99 99
 
100 100
 	/** Converts "week" to "weeks", "month" to "months" etc when plural is required using language from $locale */
101 101
 	private function getPlural($strings, $num, $interval) {
Please login to merge, or discard this patch.
Braces   +16 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,8 +49,11 @@  discard block
 block discarded – undo
49 49
 
50 50
 		$diffDays = $diff->invert === 1 ? $diff->days : 0- $diff->days;
51 51
 
52
-		if ($diffDays !== 0) return $this->dayOffset($diffDays);
53
-		else return $this->timeOffset($diff);
52
+		if ($diffDays !== 0) {
53
+			return $this->dayOffset($diffDays);
54
+		} else {
55
+			return $this->timeOffset($diff);
56
+		}
54 57
 	}
55 58
 
56 59
 	/** Calculates offset in hours/minutes/seconds */
@@ -87,8 +90,12 @@  discard block
 block discarded – undo
87 90
 			[-365, -28, $strings['future'], 28, 'months'],
88 91
 			[-999999, -365, $strings['future'], 365, 'years'],
89 92
 		];
90
-		if (isset($strings['day_before_yesterday'])) $this->add2DayRanges($ranges, $strings['day_before_yesterday'], "before");
91
-		if (isset($strings['day_after_tomorrow'])) $this->add2DayRanges($ranges, $strings['day_after_tomorrow'], "after");
93
+		if (isset($strings['day_before_yesterday'])) {
94
+			$this->add2DayRanges($ranges, $strings['day_before_yesterday'], "before");
95
+		}
96
+		if (isset($strings['day_after_tomorrow'])) {
97
+			$this->add2DayRanges($ranges, $strings['day_after_tomorrow'], "after");
98
+		}
92 99
 		return $ranges;
93 100
 	}
94 101
 
@@ -99,8 +106,11 @@  discard block
 block discarded – undo
99 106
 
100 107
 	/** Converts "week" to "weeks", "month" to "months" etc when plural is required using language from $locale */
101 108
 	private function getPlural($strings, $num, $interval) {
102
-		if ($interval !== '') return $num == 1 ? $strings[$interval . '_singular'] : $strings[$interval . '_plural'];
103
-		else return '';
109
+		if ($interval !== '') {
110
+			return $num == 1 ? $strings[$interval . '_singular'] : $strings[$interval . '_plural'];
111
+		} else {
112
+			return '';
113
+		}
104 114
 	}
105 115
 
106 116
 	/** Calculates offset in days/weeks/month/years */
Please login to merge, or discard this patch.
src/Parser/ValueData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
 	public function extract($last, $autoLookup, $traversing) {
71 71
 		$value = $this->read($last);
72
-		if ($value !== null && ($autoLookup || $traversing) ) {
72
+		if ($value !== null && ($autoLookup || $traversing)) {
73 73
 			return $value;
74 74
 		}
75 75
 		throw new \UnexpectedValueException('Not found');
Please login to merge, or discard this patch.
Braces   +25 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,13 +15,17 @@  discard block
 block discarded – undo
15 15
 
16 16
 	//Read $key from array, $this->data = $this->data[$key] but also works for objects
17 17
 	private function traverseInto($key) {
18
-		if (isset($this->data->{$key})) $this->data = $this->data->{$key};
19
-		else if ($this->isArray() && isset($this->data[$key])) $this->data = $this->data[$key];
18
+		if (isset($this->data->{$key})) {
19
+			$this->data = $this->data->{$key};
20
+		} else if ($this->isArray() && isset($this->data[$key])) {
21
+			$this->data = $this->data[$key];
22
+		}
20 23
 	}
21 24
 
22 25
 	public function traverse($key, $result) {
23
-		if ($key !== null) $this->traverseInto($key);
24
-		else {
26
+		if ($key !== null) {
27
+			$this->traverseInto($key);
28
+		} else {
25 29
 			//But if the key is null, replace the data structure with the result of the last function call
26 30
 			$lastResult = $result->pop();
27 31
 			if ($lastResult) {
@@ -41,10 +45,14 @@  discard block
 block discarded – undo
41 45
 
42 46
 	public function read($value) {
43 47
 		if ($this->isArray()) {
44
-			if (isset($this->data[$value])) return $this->data[$value];
48
+			if (isset($this->data[$value])) {
49
+				return $this->data[$value];
50
+			}
51
+		} else if (isset($this->data->$value)) {
52
+			return $this->data->$value;
53
+		} else {
54
+			return null;
45 55
 		}
46
-		else if (isset($this->data->$value)) return $this->data->$value;
47
-		else return null;
48 56
 	}
49 57
 
50 58
 	public function call($func, $args) {
@@ -57,14 +65,20 @@  discard block
 block discarded – undo
57 65
 
58 66
 	public function parseNested($parser, $token, $funcName) {
59 67
 		$args = $parser->parseTokens($token['value'], $this->data);
60
-		if ($args[0] === $this->data) $args = [];
68
+		if ($args[0] === $this->data) {
69
+			$args = [];
70
+		}
61 71
 		return $this->callFuncOnObject($this->data, $funcName, $args);
62 72
 	}
63 73
 
64 74
 	private function callFuncOnObject($obj, $func, $args) {
65
-		if (isset($obj->$func) && is_callable($obj->$func)) return call_user_func_array($obj->$func, $args);
66
-		else if (is_callable([$obj, $func])) return call_user_func_array([$obj, $func], $args);
67
-		else return false;
75
+		if (isset($obj->$func) && is_callable($obj->$func)) {
76
+			return call_user_func_array($obj->$func, $args);
77
+		} else if (is_callable([$obj, $func])) {
78
+			return call_user_func_array([$obj, $func], $args);
79
+		} else {
80
+			return false;
81
+		}
68 82
 	}
69 83
 
70 84
 	public function extract($last, $autoLookup, $traversing) {
Please login to merge, or discard this patch.
src/FilePath.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@
 block discarded – undo
14 14
 
15 15
 	public function getFilePath($filePath) {
16 16
 		if (is_file($filePath)) return $filePath;
17
-		else if (is_file($this->baseDir . DIRECTORY_SEPARATOR . $filePath)) return $this->baseDir . DIRECTORY_SEPARATOR . $filePath;
17
+		else if (is_file($this->baseDir.DIRECTORY_SEPARATOR.$filePath)) return $this->baseDir.DIRECTORY_SEPARATOR.$filePath;
18 18
 		else return $this->loadFromPaths($filePath);
19 19
 	}
20 20
 
21 21
 	private function loadFromPaths($filePath) {
22 22
 		foreach ($this->paths as $path) {
23
-			if (is_file($path . DIRECTORY_SEPARATOR . $filePath)) return $path . DIRECTORY_SEPARATOR . $filePath;
23
+			if (is_file($path.DIRECTORY_SEPARATOR.$filePath)) return $path.DIRECTORY_SEPARATOR.$filePath;
24 24
 		}
25 25
 
26
-		throw new \Exception($filePath . ' not found in include path: ' . implode(';', $this->paths));
26
+		throw new \Exception($filePath.' not found in include path: '.implode(';', $this->paths));
27 27
 	}
28 28
 }
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,14 +13,20 @@
 block discarded – undo
13 13
 	}
14 14
 
15 15
 	public function getFilePath($filePath) {
16
-		if (is_file($filePath)) return $filePath;
17
-		else if (is_file($this->baseDir . DIRECTORY_SEPARATOR . $filePath)) return $this->baseDir . DIRECTORY_SEPARATOR . $filePath;
18
-		else return $this->loadFromPaths($filePath);
16
+		if (is_file($filePath)) {
17
+			return $filePath;
18
+		} else if (is_file($this->baseDir . DIRECTORY_SEPARATOR . $filePath)) {
19
+			return $this->baseDir . DIRECTORY_SEPARATOR . $filePath;
20
+		} else {
21
+			return $this->loadFromPaths($filePath);
22
+		}
19 23
 	}
20 24
 
21 25
 	private function loadFromPaths($filePath) {
22 26
 		foreach ($this->paths as $path) {
23
-			if (is_file($path . DIRECTORY_SEPARATOR . $filePath)) return $path . DIRECTORY_SEPARATOR . $filePath;
27
+			if (is_file($path . DIRECTORY_SEPARATOR . $filePath)) {
28
+				return $path . DIRECTORY_SEPARATOR . $filePath;
29
+			}
24 30
 		}
25 31
 
26 32
 		throw new \Exception($filePath . ' not found in include path: ' . implode(';', $this->paths));
Please login to merge, or discard this patch.
src/Parser/Last.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
 		$this->last = $value;
54 54
 	}
55 55
 
56
-    public function makeTraversing() {
57
-        $this->traversing = true;
58
-    }
56
+	public function makeTraversing() {
57
+		$this->traversing = true;
58
+	}
59 59
 
60 60
 	//Applies the current operation to whatever is in $last based on $mode
61 61
 	public function process() {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
 			try {
64 64
 				$value = $this->data->extract($this->last, $this->autoLookup, $this->traversing);
65 65
 				$this->result->processValue($value);
66
-			}
67
-			catch (\UnexpectedValueException $e) {
66
+			} catch (\UnexpectedValueException $e) {
68 67
 				$this->processLastUnexpected();
69 68
 			}
70 69
 		}
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
 	private function processLastUnexpected() {
74 73
 		if (!($this->autoLookup || $this->traversing)) {
75 74
 			$this->result->processValue($this->last);
76
-		}
77
-		else {
75
+		} else {
78 76
 			$this->result->clear();
79 77
 			$this->result->processValue(false);
80 78
 		}
Please login to merge, or discard this patch.
src/Parser/Value.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
 		}
149 149
 		else $parsedVal = null;
150 150
         
151
-        $this->result->postProcess($this->data, $val, $parsedVal, $this->allowNullResult);
151
+		$this->result->postProcess($this->data, $val, $parsedVal, $this->allowNullResult);
152 152
 
153 153
 		$this->last->clear();
154 154
 	}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 		if ($lastResult) {
86 86
 			$this->last->makeTraversing();
87 87
 		}
88
-		else if ($this->last->isEmpty())  {
88
+		else if ($this->last->isEmpty()) {
89 89
 			$this->processString(['value' => '.']);
90 90
 			$this->result->setMode(Tokenizer::CONCAT);
91 91
 		}
Please login to merge, or discard this patch.
Braces   +11 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,7 +56,9 @@  discard block
 block discarded – undo
56 56
 		$this->last = new Last($this->data, $this->result, $this->autoLookup);
57 57
 		$this->traversing = false;
58 58
 
59
-		if (count($tokens) <= 0) return [$data];
59
+		if (count($tokens) <= 0) {
60
+			return [$data];
61
+		}
60 62
 
61 63
 		foreach (new TokenFilterIterator($tokens, [Tokenizer::WHITESPACE, Tokenizer::NEW_LINE]) as $token) {
62 64
 			$this->{$this->tokenFuncs[$token['type']]}($token);
@@ -84,8 +86,7 @@  discard block
 block discarded – undo
84 86
 		// foo.bar is treated as looking up `bar` in `foo` whereas .foo is treated as the string ".foo"
85 87
 		if ($lastResult) {
86 88
 			$this->last->makeTraversing();
87
-		}
88
-		else if ($this->last->isEmpty())  {
89
+		} else if ($this->last->isEmpty())  {
89 90
 			$this->processString(['value' => '.']);
90 91
 			$this->result->setMode(Tokenizer::CONCAT);
91 92
 		}
@@ -100,11 +101,12 @@  discard block
 block discarded – undo
100 101
 	private function processSquareBracket($token) {
101 102
 		if ($this->hasFunction($this->last->read())) {
102 103
 			$this->callTransphpormFunctions($token);
103
-		}
104
-		else {
104
+		} else {
105 105
 			$this->last->traverse();
106 106
 			$this->last->set($this->getNewParser()->parseTokens($token['value'], null)[0]);
107
-			if (!is_bool($this->last->read())) $this->last->makeTraversing();
107
+			if (!is_bool($this->last->read())) {
108
+				$this->last->makeTraversing();
109
+			}
108 110
 		}
109 111
 	}
110 112
 
@@ -127,8 +129,7 @@  discard block
 block discarded – undo
127 129
 		if ($this->hasFunction($this->last->read())
128 130
 			&& !$this->data->methodExists($this->last->read())) {
129 131
 			$this->callTransphpormFunctions($token);
130
-		}
131
-		else {
132
+		} else {
132 133
 			$this->last->processNested($this->getNewParser(), $token);
133 134
 		}
134 135
 	}
@@ -145,8 +146,9 @@  discard block
 block discarded – undo
145 146
 			$parser = new Value($this->data->getData());
146 147
 			$parsedArr = $parser->parse($val);
147 148
 			$parsedVal = isset($parsedArr[0]) ? $parsedArr[0] : null;
149
+		} else {
150
+			$parsedVal = null;
148 151
 		}
149
-		else $parsedVal = null;
150 152
         
151 153
         $this->result->postProcess($this->data, $val, $parsedVal, $this->allowNullResult);
152 154
 
Please login to merge, or discard this patch.
src/Property/ContentPseudo.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 namespace Transphporm\Property;
3 3
 
4 4
 interface ContentPseudo {
5
-    public function run($value, $pseudoArgs, $element);
5
+	public function run($value, $pseudoArgs, $element);
6 6
 }
Please login to merge, or discard this patch.
src/Property/Content.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
 		return (isset($rules['content-mode'])) ? $rules['content-mode']->read() : 'append';
40 40
 	}
41 41
 
42
-    public function addContentPseudo($name, ContentPseudo $contentPseudo) {
43
-        $this->contentPseudo[$name] = $contentPseudo;
44
-    }
42
+	public function addContentPseudo($name, ContentPseudo $contentPseudo) {
43
+		$this->contentPseudo[$name] = $contentPseudo;
44
+	}
45 45
     
46 46
 	private function processPseudo($value, $element, $pseudoMatcher) {
47 47
 		foreach ($this->contentPseudo as $pseudoName => $pseudoFunction) {
Please login to merge, or discard this patch.
Braces   +22 added lines, -11 removed lines patch added patch discarded remove patch
@@ -14,7 +14,9 @@  discard block
 block discarded – undo
14 14
 	}
15 15
 
16 16
 	public function run(array $values, \DomElement $element, array $rules, \Transphporm\Hook\PseudoMatcher $pseudoMatcher, array $properties = []) {
17
-		if (!$this->shouldRun($element)) return false;
17
+		if (!$this->shouldRun($element)) {
18
+			return false;
19
+		}
18 20
 
19 21
 		$values = $this->formatter->format($values, $rules);
20 22
 
@@ -22,14 +24,19 @@  discard block
 block discarded – undo
22 24
 			//Remove the current contents
23 25
 			$this->removeAllChildren($element);
24 26
 			//Now make a text node
25
-			if ($this->getContentMode($rules) === 'replace') $this->replaceContent($element, $values);
26
-			else $this->appendContent($element, $values);
27
+			if ($this->getContentMode($rules) === 'replace') {
28
+				$this->replaceContent($element, $values);
29
+			} else {
30
+				$this->appendContent($element, $values);
31
+			}
27 32
 		}
28 33
 	}
29 34
 
30 35
 	private function shouldRun($element) {
31 36
 		do {
32
-			if ($element->getAttribute('transphporm') == 'includedtemplate') return false;
37
+			if ($element->getAttribute('transphporm') == 'includedtemplate') {
38
+				return false;
39
+			}
33 40
 		}
34 41
 		while (($element = $element->parentNode) instanceof \DomElement);
35 42
 		return true;
@@ -56,9 +63,10 @@  discard block
 block discarded – undo
56 63
 	public function getNode($node, $document) {
57 64
 		foreach ($node as $n) {
58 65
 			if (is_array($n)) {
59
-				foreach ($this->getNode($n, $document) as $new) yield $new;
60
-			}
61
-			else {
66
+				foreach ($this->getNode($n, $document) as $new) {
67
+					yield $new;
68
+				}
69
+			} else {
62 70
 				yield $this->convertNode($n, $document);
63 71
 			}
64 72
 		}
@@ -69,9 +77,10 @@  discard block
 block discarded – undo
69 77
 			$new = $document->importNode($node, true);
70 78
 			//Removing this might cause problems with caching...
71 79
 			//$new->setAttribute('transphporm', 'added');
72
-		}
73
-		else {
74
-			if ($node instanceof \DomText) $node = $node->nodeValue;
80
+		} else {
81
+			if ($node instanceof \DomText) {
82
+				$node = $node->nodeValue;
83
+			}
75 84
 			$new = $document->createElement('text');
76 85
 
77 86
 			$new->appendChild($document->createTextNode($node));
@@ -95,6 +104,8 @@  discard block
 block discarded – undo
95 104
 	}
96 105
 
97 106
 	private function removeAllChildren($element) {
98
-		while ($element->hasChildNodes()) $element->removeChild($element->firstChild);
107
+		while ($element->hasChildNodes()) {
108
+			$element->removeChild($element->firstChild);
109
+		}
99 110
 	}
100 111
 }
Please login to merge, or discard this patch.
src/Property/ContentPseudo/Attr.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Transphporm\Property\ContentPseudo;
3 3
 class Attr implements \Transphporm\Property\ContentPseudo {
4
-    public function run($value, $pseudoArgs, $element) {
5
-        $element->setAttribute($pseudoArgs, implode('', $value));
6
-    }
4
+	public function run($value, $pseudoArgs, $element) {
5
+		$element->setAttribute($pseudoArgs, implode('', $value));
6
+	}
7 7
 }
Please login to merge, or discard this patch.
src/Property/ContentPseudo/BeforeAfter.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Transphporm\Property\ContentPseudo;
3 3
 class BeforeAfter implements \Transphporm\Property\ContentPseudo {
4
-    private $insertLocation;
5
-    private $content;
4
+	private $insertLocation;
5
+	private $content;
6 6
 
7
-    public function __construct($insertLocation, \Transphporm\Property\Content $content) {
8
-        $this->insertLocation = $insertLocation;
7
+	public function __construct($insertLocation, \Transphporm\Property\Content $content) {
8
+		$this->insertLocation = $insertLocation;
9 9
 		$this->content = $content;
10 10
 	}
11 11
 
12
-    public function run($value, $pseudoArgs, $element) {
13
-        foreach ($this->content->getNode($value, $element->ownerDocument) as $node) {
12
+	public function run($value, $pseudoArgs, $element) {
13
+		foreach ($this->content->getNode($value, $element->ownerDocument) as $node) {
14 14
 			if ($this->insertLocation === "before") $element->insertBefore($node, $element->firstChild);
15
-            else if ($this->insertLocation === "after") $element->appendChild($node);
15
+			else if ($this->insertLocation === "after") $element->appendChild($node);
16 16
 		}
17
-    }
17
+	}
18 18
 }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,11 @@
 block discarded – undo
11 11
 
12 12
     public function run($value, $pseudoArgs, $element) {
13 13
         foreach ($this->content->getNode($value, $element->ownerDocument) as $node) {
14
-			if ($this->insertLocation === "before") $element->insertBefore($node, $element->firstChild);
15
-            else if ($this->insertLocation === "after") $element->appendChild($node);
14
+			if ($this->insertLocation === "before") {
15
+				$element->insertBefore($node, $element->firstChild);
16
+			} else if ($this->insertLocation === "after") {
17
+            	$element->appendChild($node);
18
+            }
16 19
 		}
17 20
     }
18 21
 }
Please login to merge, or discard this patch.