Code Duplication    Length = 7-7 lines in 2 locations

nospace.php 1 location

@@ 22-28 (lines=7) @@
19
 * @return xml
20
 */
21
function noSpace($xml) {
22
	foreach ($xml as $key => $value) {
23
		if (sizeof($value) > 1) {
24
			noSpace($value); // Get next node
25
		} else {
26
			$xml->$key = trim($value);
27
		}
28
	}
29
	return $xml;
30
}

NoXMLSpace.class.php 1 location

@@ 34-40 (lines=7) @@
31
32
		if (empty($xml) || is_null($xml)) return false;
33
34
		foreach ($xml as $key => $value) {
35
			if (sizeof($value) > 1) {
36
				noSpace($value); // Get next node
37
			} else {
38
				$xml->$key = trim($value);
39
			}
40
		}
41
		return $xml;
42
	}
43