Code Duplication    Length = 8-8 lines in 2 locations

code/control/Dispatcher.php 2 locations

@@ 165-172 (lines=8) @@
162
	 * @param string|array
163
	 * @return string|array
164
	 */
165
	protected function trimWhitespace($val) {
166
		if(is_array($val)) {
167
			foreach($val as $k => $v) $val[$k] = $this->trimWhitespace($v);
168
			return $val;
169
		} else {
170
			return trim($val);
171
		}
172
	}
173
174
	/**
175
	 * Remove control characters from the input.
@@ 180-187 (lines=8) @@
177
	 * @param string|array
178
	 * @return string|array
179
	 */
180
	protected function stripNonPrintables($val) {
181
		if(is_array($val)) {
182
			foreach($val as $k => $v) $val[$k] = $this->stripNonPrintables($v);
183
			return $val;
184
		} else {
185
			return preg_replace('/[[:cntrl:]]/', '', $val);
186
		}
187
	}
188
189
}
190