Code Duplication    Length = 10-10 lines in 2 locations

classes/class-admin.php 2 locations

@@ 285-294 (lines=10) @@
282
     * @param $needle string
283
     * @param $echo bool
284
	 */
285
	public function checked($haystack=false,$needle='',$echo=true) {
286
	    $return = $this->itemd($haystack,$needle,'checked');
287
	    if('' !== $return) {
288
			if (true === $echo) {
289
				echo $return;
290
			} else {
291
				return $return;
292
			}
293
		}
294
	}
295
296
	/**
297
	 * Checks to see if an item is checked.
@@ 303-312 (lines=10) @@
300
	 * @param $needle string
301
     * @param $echo bool
302
	 */
303
	public function selected($haystack=false,$needle='',$echo=true) {
304
		$return = $this->itemd($haystack,$needle,'selected');
305
		if('' !== $return) {
306
			if (true === $echo) {
307
				echo $return;
308
			} else {
309
				return $return;
310
			}
311
		}
312
	}
313
314
	/**
315
	 * Checks to see if an item is selected. If $echo is false,  it will return the $type if conditions are true.