Completed
Push — master ( a0fa0b...06252b )
by Tom
02:58
created
src/PropertyBuilder.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@
 block discarded – undo
20 20
 		$formatter->register(new Formatter\Date($locale));
21 21
 		$formatter->register(new Formatter\StringFormatter());
22 22
 		
23
-		foreach ($formatters as $format) $formatter->register($format);
23
+		foreach ($formatters as $format) {
24
+			$formatter->register($format);
25
+		}
24 26
 
25 27
 		$this->builder->registerProperty('content', new Property\Content($data, $headers, $formatter));
26 28
 		$this->builder->registerProperty('repeat', new Property\Repeat($data));
Please login to merge, or discard this patch.
src/Hook/PropertyHook.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,11 +20,15 @@  discard block
 block discarded – undo
20 20
 
21 21
 	public function run(\DomElement $element) {	
22 22
 		//Don't run if there's a pseudo element like nth-child() and this element doesn't match it
23
-		if (!$this->pseudoMatcher->matches($element)) return;
23
+		if (!$this->pseudoMatcher->matches($element)) {
24
+			return;
25
+		}
24 26
 
25 27
 		foreach ($this->rules as $name => $value) {
26 28
 			$result = $this->callProperty($name, $element, $this->valueParser->parse(trim($value), $element));
27
-			if ($result === false) break;
29
+			if ($result === false) {
30
+				break;
31
+			}
28 32
 		}
29 33
 	}
30 34
 
@@ -45,7 +49,9 @@  discard block
 block discarded – undo
45 49
 	}
46 50
 
47 51
 	private function callProperty($name, $element, $value) {
48
-		if (isset($this->properties[$name])) return $this->properties[$name]->run($value, $element, $this);
52
+		if (isset($this->properties[$name])) {
53
+			return $this->properties[$name]->run($value, $element, $this);
54
+		}
49 55
 		return false;
50 56
 	}
51 57
 
Please login to merge, or discard this patch.
src/Parser/Sheet.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 			$selector = trim(substr($this->tss, $pos, $next-$pos));
30 30
 			$rule = $this->cssToRule($selector, count($rules));	
31
-			$pos =  strpos($this->tss, '}', $next)+1;
31
+			$pos = strpos($this->tss, '}', $next)+1;
32 32
 			$rule->properties = $this->getProperties(trim(substr($this->tss, $next+1, $pos-2-$next)));	
33 33
 			$rules = $this->writeRule($rules, $selector, $rule);
34 34
 		}
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	private function processingInstructions($tss, $pos, $next) {
55 55
 		$rules = [];
56 56
 		while (($atPos = strpos($tss, '@', $pos)) !== false) {
57
-			if ($atPos  <= (int) $next) {
57
+			if ($atPos <= (int) $next) {
58 58
 				$spacePos = strpos($tss, ' ', $atPos);
59 59
 				$funcName = substr($tss, $atPos+1, $spacePos-$atPos-1);
60 60
 				$pos = strpos($tss, ';', $spacePos);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	}
71 71
 
72 72
 	private function import($args) {
73
-		$sheet = new Sheet(file_get_contents($this->baseDir . trim($args, '\'" ')), $this->baseDir, $this->valueParser, $this->prefix);
73
+		$sheet = new Sheet(file_get_contents($this->baseDir.trim($args, '\'" ')), $this->baseDir, $this->valueParser, $this->prefix);
74 74
 		return $sheet->parse();
75 75
 	}
76 76
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@  discard block
 block discarded – undo
33 33
 			$rules = $this->writeRule($rules, $selector, $rule);
34 34
 		}
35 35
 		//there may be processing instructions at the end
36
-		if ($processing = $this->processingInstructions($this->tss, $pos, strlen($this->tss), count($rules)+$indexStart)) $rules = array_merge($rules, $processing['rules']);
36
+		if ($processing = $this->processingInstructions($this->tss, $pos, strlen($this->tss), count($rules)+$indexStart)) {
37
+			$rules = array_merge($rules, $processing['rules']);
38
+		}
37 39
 		usort($rules, [$this, 'sortRules']);
38 40
 		return $rules;
39 41
 	}
@@ -63,8 +65,7 @@  discard block
 block discarded – undo
63 65
 				$pos = strpos($tss, ';', $spacePos);
64 66
 				$args = substr($tss, $spacePos+1, $pos-$spacePos-1);
65 67
 				$rules = array_merge($rules, $this->$funcName($args, $indexStart));
66
-			}
67
-			else {
68
+			} else {
68 69
 				break;	
69 70
 			} 
70 71
 		}
@@ -79,7 +80,9 @@  discard block
 block discarded – undo
79 80
 
80 81
 	private function sortRules($a, $b) {
81 82
 		//If they have the same depth, compare on index
82
-		if ($a->depth === $b->depth) return $a->index < $b->index ? -1 : 1;
83
+		if ($a->depth === $b->depth) {
84
+			return $a->index < $b->index ? -1 : 1;
85
+		}
83 86
 
84 87
 		return ($a->depth < $b->depth) ? -1 : 1;
85 88
 	}
@@ -100,7 +103,9 @@  discard block
 block discarded – undo
100 103
 		$return = [];
101 104
 
102 105
 		foreach ($rules as $rule) {
103
-			if (trim($rule) === '') continue;
106
+			if (trim($rule) === '') {
107
+				continue;
108
+			}
104 109
 			$parts = explode(':', $rule, 2);
105 110
 
106 111
 			$parts[1] = $stringExtractor->rebuild($parts[1]);
Please login to merge, or discard this patch.
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -12,6 +12,9 @@  discard block
 block discarded – undo
12 12
 	private $prefix;
13 13
 	private $valueParser;
14 14
 
15
+	/**
16
+	 * @param string $tss
17
+	 */
15 18
 	public function __construct($tss, $baseDir, Value $valueParser, $prefix = '') {
16 19
 		$this->tss = $this->stripComments($tss);
17 20
 		$this->baseDir = $baseDir;
@@ -37,6 +40,10 @@  discard block
 block discarded – undo
37 40
 		return $rules;
38 41
 	}
39 42
 
43
+	/**
44
+	 * @param string $selector
45
+	 * @param integer $index
46
+	 */
40 47
 	private function CssToRules($selector, $index, $properties) {
41 48
 		$parts = explode(',', $selector);
42 49
 		$rules = [];
@@ -59,6 +66,11 @@  discard block
 block discarded – undo
59 66
 		return $rules;
60 67
 	}
61 68
 
69
+	/**
70
+	 * @param integer $pos
71
+	 * @param integer $next
72
+	 * @param integer $indexStart
73
+	 */
62 74
 	private function processingInstructions($tss, $pos, $next, $indexStart) {
63 75
 		$rules = [];
64 76
 		while (($atPos = strpos($tss, '@', $pos)) !== false) {
@@ -99,6 +111,9 @@  discard block
 block discarded – undo
99 111
 		return $str;
100 112
 	}
101 113
 
114
+	/**
115
+	 * @param string $str
116
+	 */
102 117
 	private function getProperties($str) {
103 118
 		$stringExtractor = new StringExtractor($str);
104 119
 		$rules = explode(';', $stringExtractor);
Please login to merge, or discard this patch.
src/Parser/StringExtractor.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
 		while (($pos = strpos($str, '"', $pos+1)) !== false) {
18 18
 			$end = strpos($str, '"', $pos+1);
19 19
 			while ($str[$end-1] == '\\') $end = strpos($str, '"', $end+1);
20
-			$strings['$+STR' . ++$num] = substr($str, $pos, $end-$pos+1);
21
-			$str = substr_replace($str, '$+STR' . $num, $pos, $end-$pos+1);
20
+			$strings['$+STR'.++$num] = substr($str, $pos, $end-$pos+1);
21
+			$str = substr_replace($str, '$+STR'.$num, $pos, $end-$pos+1);
22 22
 		}
23 23
 
24 24
 		return [$str, $strings];
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@
 block discarded – undo
16 16
 		$strings = [];
17 17
 		while (($pos = strpos($str, '"', $pos+1)) !== false) {
18 18
 			$end = strpos($str, '"', $pos+1);
19
-			while ($str[$end-1] == '\\') $end = strpos($str, '"', $end+1);
19
+			while ($str[$end-1] == '\\') {
20
+				$end = strpos($str, '"', $end+1);
21
+			}
20 22
 			$strings['$+STR' . ++$num] = substr($str, $pos, $end-$pos+1);
21 23
 			$str = substr_replace($str, '$+STR' . $num, $pos, $end-$pos+1);
22 24
 		}
Please login to merge, or discard this patch.
src/Parser/Value.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 		$finalPos = $this->findMatchingPos($str, $marker);
65 65
 		$string = substr($str, 1, $finalPos-1);
66 66
 		//Now remove escape characters
67
-		return str_replace('\\' . $marker, $marker, $string);
67
+		return str_replace('\\'.$marker, $marker, $string);
68 68
 	}
69 69
 
70 70
 	private function parseFunction($function) {
Please login to merge, or discard this patch.
Braces   +20 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,14 +27,17 @@  discard block
 block discarded – undo
27 27
 
28 28
 			//Count the number of fresh opening ( before $close
29 29
 			$cPos = $open+1;
30
-			while (($cPos = strpos($function, '(', $cPos+1)) !== false && $cPos < $close) $close = strpos($function, ')', $close+1);
30
+			while (($cPos = strpos($function, '(', $cPos+1)) !== false && $cPos < $close) {
31
+				$close = strpos($function, ')', $close+1);
32
+			}
31 33
 
32 34
 			$name = substr($function, 0, $open);
33 35
 
34 36
 			$params = substr($function, $open+1, $close-$open-1);
35 37
 			return ['name' => $name, 'params' => $params, 'endPoint' => $close];
38
+		} else {
39
+			return ['name' => null, 'params' => $function, 'endPoint' => strlen($function)];
36 40
 		}
37
-		else return ['name' => null, 'params' => $function, 'endPoint' => strlen($function)];
38 41
 		
39 42
 	}
40 43
 
@@ -43,23 +46,26 @@  discard block
 block discarded – undo
43 46
 		if ($function && in_array($function[0], ['\'', '"'])) {
44 47
 			$finalPos = $this->findMatchingPos($function, $function[0]);
45 48
 			$result[] = $this->extractQuotedString($function[0], $function);
46
-		}
47
-		else {
49
+		} else {
48 50
 			$func = $this->parseFunction($function);
49 51
 			$finalPos = $func['endPoint'];			
50 52
 
51 53
 			if (($data = $this->callFunc($func['name'], $func['params'], $element)) !== false) {
52 54
 				$result = $this->appendToArray($result, $data);
53
-			} 
54
-			else $result[] = trim($function);
55
+			} else {
56
+				$result[] = trim($function);
57
+			}
55 58
 		}
56 59
 		$remaining = trim(substr($function, $finalPos+1));
57 60
 		return $this->parseNextValue($remaining, $result, $element);
58 61
 	}
59 62
 
60 63
 	private function appendToArray($array, $value) {
61
-		if (is_array($value)) $array += $value;
62
-		else $array[] = $value;
64
+		if (is_array($value)) {
65
+			$array += $value;
66
+		} else {
67
+			$array[] = $value;
68
+		}
63 69
 		return $array;
64 70
 	}
65 71
 
@@ -71,7 +77,9 @@  discard block
 block discarded – undo
71 77
 	}
72 78
 
73 79
 	private function parseNextValue($remaining, $result, $element) {
74
-		if (strlen($remaining) > 0 && $remaining[0] == ',') $result = array_merge($result, $this->parse(trim(substr($remaining, 1)), $element));
80
+		if (strlen($remaining) > 0 && $remaining[0] == ',') {
81
+			$result = array_merge($result, $this->parse(trim(substr($remaining, 1)), $element));
82
+		}
75 83
 		return $result;
76 84
 	}
77 85
 	
@@ -79,8 +87,9 @@  discard block
 block discarded – undo
79 87
 		$pos = $start+1;
80 88
 		$end = 0;
81 89
 		while ($end = strpos($string, $char, $pos)) {
82
-			if ($string[$end-1] === $escape) $pos = $end+1;
83
-			else {
90
+			if ($string[$end-1] === $escape) {
91
+				$pos = $end+1;
92
+			} else {
84 93
 				break;
85 94
 			}
86 95
 		}
Please login to merge, or discard this patch.
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -63,6 +63,9 @@  discard block
 block discarded – undo
63 63
 		return $array;
64 64
 	}
65 65
 
66
+	/**
67
+	 * @param \DOMElement $element
68
+	 */
66 69
 	private function callFunc($name, $params, $element) {
67 70
 		if ($name && is_callable([$this->dataFunction, $name])) {
68 71
 			return $this->dataFunction->$name($this->parse($params, $element), $element);	
@@ -70,6 +73,10 @@  discard block
 block discarded – undo
70 73
 		return false;
71 74
 	}
72 75
 
76
+	/**
77
+	 * @param string $remaining
78
+	 * @param \DOMElement $element
79
+	 */
73 80
 	private function parseNextValue($remaining, $result, $element) {
74 81
 		if (strlen($remaining) > 0 && $remaining[0] == ',') $result = array_merge($result, $this->parse(trim(substr($remaining, 1)), $element));
75 82
 		return $result;
Please login to merge, or discard this patch.
src/Property/Bind.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 		$this->data = $data;
13 13
 	}
14 14
 
15
-	public function run($value, \DomElement $element, \Transphporm\Hook\PropertyHook $rule)  {
15
+	public function run($value, \DomElement $element, \Transphporm\Hook\PropertyHook $rule) {
16 16
 		$this->data->bind($element, $value);
17 17
 	}
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
src/Parser/CssToXpath.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -50,6 +50,9 @@
 block discarded – undo
50 50
 		return $attr;
51 51
 	}
52 52
 
53
+	/**
54
+	 * @param string $comparator
55
+	 */
53 56
 	private static function compare($comparator, $a, $b) {
54 57
 		if ($comparator == '=') return $a == $b;
55 58
 		else if ($comparator == '!=') return $a != $b;
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,8 +51,11 @@  discard block
 block discarded – undo
51 51
 	}
52 52
 
53 53
 	private static function compare($comparator, $a, $b) {
54
-		if ($comparator == '=') return $a == $b;
55
-		else if ($comparator == '!=') return $a != $b;
54
+		if ($comparator == '=') {
55
+			return $a == $b;
56
+		} else if ($comparator == '!=') {
57
+			return $a != $b;
58
+		}
56 59
 	}
57 60
 
58 61
 	//split the css into indivudal functions
@@ -66,8 +69,9 @@  discard block
 block discarded – undo
66 69
 				$selector = $this->createSelector();
67 70
 				$selector->type = $css[$i];
68 71
 				$selectors[] = $selector;
72
+			} else {
73
+				$selector->string .= $css[$i];
69 74
 			}
70
-			else $selector->string .= $css[$i];			
71 75
 		}
72 76
 		return $selectors;
73 77
 	}
@@ -78,7 +82,9 @@  discard block
 block discarded – undo
78 82
 		$this->depth = count($selectors);
79 83
 		$xpath = '/';
80 84
 		foreach ($selectors as $selector) {
81
-			if (isset($this->translators[$selector->type])) $xpath .= $this->translators[$selector->type]($selector->string, $xpath);
85
+			if (isset($this->translators[$selector->type])) {
86
+				$xpath .= $this->translators[$selector->type]($selector->string, $xpath);
87
+			}
82 88
 		}
83 89
 
84 90
 		$xpath = str_replace('/[', '/*[', $xpath);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
 	public function __construct($css, Value $valueParser, $prefix = '') {
16 16
 		$hash = $this->registerInstance();
17 17
 		$this->valueParser = $valueParser;
18
-		$this->css = str_replace([' >', '> '],['>', '>'], trim($css));
18
+		$this->css = str_replace([' >', '> '], ['>', '>'], trim($css));
19 19
 		$this->translators = [
20
-			' ' => function($string) use ($prefix) { return '//' . $prefix . $string;	},
21
-			'' => function($string) use ($prefix) { return '/' . $prefix . $string;	},
22
-			'>' => function($string) use ($prefix) { return '/' . $prefix  . $string; },
23
-			'#' => function($string) { return '[@id=\'' . $string . '\']'; },
24
-			'.' => function($string) { return '[contains(concat(\' \', normalize-space(@class), \' \'), \' ' . $string . ' \')]'; }, 
25
-			'[' => function($string, $xpath) use($hash) { return '[' .'php:function(\'\Transphporm\Parser\CssToXpath::processAttr\', \'' . $string . '\', ., "' . $hash . '")' . ']';	},
20
+			' ' => function($string) use ($prefix) { return '//'.$prefix.$string; },
21
+			'' => function($string) use ($prefix) { return '/'.$prefix.$string; },
22
+			'>' => function($string) use ($prefix) { return '/'.$prefix.$string; },
23
+			'#' => function($string) { return '[@id=\''.$string.'\']'; },
24
+			'.' => function($string) { return '[contains(concat(\' \', normalize-space(@class), \' \'), \' '.$string.' \')]'; }, 
25
+			'[' => function($string, $xpath) use($hash) { return '['.'php:function(\'\Transphporm\Parser\CssToXpath::processAttr\', \''.$string.'\', ., "'.$hash.'")'.']'; },
26 26
 			']' => function() {	return ''; }
27 27
 		];
28 28
 	}
Please login to merge, or discard this patch.
src/Property/Display.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,12 @@
 block discarded – undo
7 7
 namespace Transphporm\Property;
8 8
 class Display implements \Transphporm\Property {
9 9
 	public function run($value, \DomElement $element, \Transphporm\Hook\PropertyHook $rule) {
10
-		if ($attr = $rule->getPseudoMatcher()->attr()) $element->removeAttribute($attr);
11
-		else if (strtolower($value[0]) === 'none') $element->setAttribute('transphporm', 'remove');
12
-		else $element->setAttribute('transphporm', 'show');
10
+		if ($attr = $rule->getPseudoMatcher()->attr()) {
11
+			$element->removeAttribute($attr);
12
+		} else if (strtolower($value[0]) === 'none') {
13
+			$element->setAttribute('transphporm', 'remove');
14
+		} else {
15
+			$element->setAttribute('transphporm', 'show');
16
+		}
13 17
 	}
14 18
 }
15 19
\ No newline at end of file
Please login to merge, or discard this patch.
src/Property/Content.php 2 patches
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -34,6 +34,10 @@  discard block
 block discarded – undo
34 34
 		return (isset($rules['content-mode'])) ? $rules['content-mode'] : 'append';
35 35
 	}
36 36
 
37
+	/**
38
+	 * @param \DOMElement $element
39
+	 * @param \Transphporm\Hook\PropertyHook $rule
40
+	 */
37 41
 	private function processPseudo($value, $element, $rule) {
38 42
 		return $this->pseudoAttr($value, $element, $rule) || $this->pseudoHeader($value, $element, $rule) || $this->pseudoBefore($value, $element, $rule) || $this->pseudoAfter($value, $element, $rule);
39 43
 	}
@@ -96,6 +100,9 @@  discard block
 block discarded – undo
96 100
 		foreach ($remove as $r) $r->parentNode->removeChild($r);
97 101
 	}
98 102
 
103
+	/**
104
+	 * @param \DOMElement $element
105
+	 */
99 106
 	private function replaceContent($element, $content) {
100 107
 		//If this rule was cached, the elements that were added last time need to be removed prior to running the rule again.
101 108
 		$this->removeAdded($element);
@@ -105,12 +112,18 @@  discard block
 block discarded – undo
105 112
 		$element->setAttribute('transphporm', 'remove');
106 113
 	}
107 114
 
115
+	/**
116
+	 * @param \DOMElement $element
117
+	 */
108 118
 	private function appendContent($element, $content) {
109 119
 		foreach ($this->getNode($content, $element->ownerDocument) as $node) {
110 120
 			$element->appendChild($node);
111 121
 		}
112 122
 	}
113 123
 
124
+	/**
125
+	 * @param \DOMElement $element
126
+	 */
114 127
 	private function removeAllChildren($element) {
115 128
 		while ($element->hasChildNodes()) $element->removeChild($element->firstChild);
116 129
 	}
Please login to merge, or discard this patch.
Braces   +18 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,15 +18,20 @@  discard block
 block discarded – undo
18 18
 	}
19 19
 
20 20
 	public function run($value, \DomElement $element, \Transphporm\Hook\PropertyHook $rule) {
21
-		if ($element->getAttribute('transphporm') === 'remove') return;
21
+		if ($element->getAttribute('transphporm') === 'remove') {
22
+			return;
23
+		}
22 24
 				
23 25
 		$value = $this->formatter->format($value, $rule->getRules());
24 26
 		if (!$this->processPseudo($value, $element, $rule)) {
25 27
 			//Remove the current contents
26 28
 			$this->removeAllChildren($element);
27 29
 			//Now make a text node
28
-			if ($this->getContentMode($rule->getRules()) === 'replace') $this->replaceContent($element, $value);
29
-			else $this->appendContent($element, $value);
30
+			if ($this->getContentMode($rule->getRules()) === 'replace') {
31
+				$this->replaceContent($element, $value);
32
+			} else {
33
+				$this->appendContent($element, $value);
34
+			}
30 35
 		}
31 36
 	}
32 37
 
@@ -57,9 +62,10 @@  discard block
 block discarded – undo
57 62
 			if ($n instanceof \DomElement) {
58 63
 				$new = $document->importNode($n, true);
59 64
 				$new->setAttribute('transphporm', 'added');
60
-			}
61
-			else {
62
-				if ($n instanceof \DomText) $n = $n->nodeValue;
65
+			} else {
66
+				if ($n instanceof \DomText) {
67
+					$n = $n->nodeValue;
68
+				}
63 69
 				$new = $document->createElement('text');
64 70
 				$new->appendChild($document->createTextNode($n));
65 71
 				$new->setAttribute('transphporm', 'text');
@@ -91,7 +97,9 @@  discard block
 block discarded – undo
91 97
 		while ($e = $e->previousSibling && !in_array($e->getAttribute('transphporm'), [null, 'remove'])) {
92 98
 			$remove[] = $e;
93 99
 		}
94
-		foreach ($remove as $r) $r->parentNode->removeChild($r);
100
+		foreach ($remove as $r) {
101
+			$r->parentNode->removeChild($r);
102
+		}
95 103
 	}
96 104
 
97 105
 	private function replaceContent($element, $content) {
@@ -110,6 +118,8 @@  discard block
 block discarded – undo
110 118
 	}
111 119
 	
112 120
 	private function removeAllChildren($element) {
113
-		while ($element->hasChildNodes()) $element->removeChild($element->firstChild);
121
+		while ($element->hasChildNodes()) {
122
+			$element->removeChild($element->firstChild);
123
+		}
114 124
 	}
115 125
 }
116 126
\ No newline at end of file
Please login to merge, or discard this patch.