Code Duplication    Length = 12-12 lines in 2 locations

lib/stores/modules/ldap_compiler.php 2 locations

@@ 47-58 (lines=12) @@
44
			case 'int':
45
				$result=$node["value"];
46
			break;
47
			case 'and':
48
				if (preg_match("/^&[0-9]+$/", $this->buildlist[sizeof($this->buildlist)-1]) &&
49
				    !$this->groupingflag) {
50
					$this->buildlist[sizeof($this->buildlist)-1]="&".
51
				          (substr($this->buildlist[sizeof($this->buildlist)-1], 1)+1);
52
				} else {
53
					array_push($this->buildlist, '&2');
54
					$this->groupingflag=false;
55
				}
56
				$this->compile_tree($node["left"]);
57
				$this->compile_tree($node["right"]);
58
			break;
59
			case 'or':
60
				if (preg_match("/^\|[0-9]+/$", $this->buildlist[sizeof($this->buildlist)-1]) &&
61
				    !$this->groupingflag) {
@@ 59-70 (lines=12) @@
56
				$this->compile_tree($node["left"]);
57
				$this->compile_tree($node["right"]);
58
			break;
59
			case 'or':
60
				if (preg_match("/^\|[0-9]+/$", $this->buildlist[sizeof($this->buildlist)-1]) &&
61
				    !$this->groupingflag) {
62
					$this->buildlist[sizeof($this->buildlist)-1]="|".
63
				          (substr($this->buildlist[sizeof($this->buildlist)-1], 1)+1);
64
				} else {
65
					array_push($this->buildlist, '|2');
66
					$this->groupingflag=false;
67
				}
68
				$this->compile_tree($node["left"]);
69
				$this->compile_tree($node["right"]);
70
			break;
71
			case 'cmp':
72
				$not=false;
73
				$joker=false;