Code Duplication    Length = 8-8 lines in 2 locations

code/control/Dispatcher.php 2 locations

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