Code Duplication    Length = 11-11 lines in 3 locations

lib/modules/mod_util.php 3 locations

@@ 120-130 (lines=11) @@
117
			return $result;
118
		}
119
120
		function _preg_replace_callback($regExp,$callback,$haystack) {
121
				$context = pobject::getContext();
122
				$me = $context["arCurrentObject"];
123
				$result = false;
124
				if (pinp_util::is_callback($callback)) {
125
						$result =  preg_replace_callback($regExp, $callback,$haystack);
126
				} else {
127
						$me->error = "'$callback' is not a valid callback function";
128
				}
129
				return $result;
130
		}
131
132
133
		function _usort(&$array, $callback) {
@@ 133-143 (lines=11) @@
130
		}
131
132
133
		function _usort(&$array, $callback) {
134
			$context = pobject::getContext();
135
			$me = $context["arCurrentObject"];
136
			$result = false;
137
			if (pinp_util::is_callback($callback)) {
138
				$result =  usort($array, $callback);
139
			} else {
140
				$me->error = "'$callback' is not a valid callback function";
141
			}
142
			return $result;
143
		}
144
145
		function _uasort(&$array, $callback) {
146
			$context = pobject::getContext();
@@ 145-155 (lines=11) @@
142
			return $result;
143
		}
144
145
		function _uasort(&$array, $callback) {
146
			$context = pobject::getContext();
147
			$me = $context["arCurrentObject"];
148
			$result = false;
149
			if (pinp_util::is_callback($callback)) {
150
				$result =  uasort($array, $callback);
151
			} else {
152
				$me->error = "'$callback' is not a valid callback function";
153
			}
154
			return $result;
155
		}
156
157
		function _path_escape($path) {
158
			return parent::path_escape($path);