Code Duplication    Length = 10-10 lines in 2 locations

classes/class-admin.php 2 locations

@@ 292-301 (lines=10) @@
289
     * @param $needle string
290
     * @param $echo bool
291
	 */
292
	public function checked($haystack=false,$needle='',$echo=true) {
293
	    $return = $this->itemd($haystack,$needle,'checked');
294
	    if('' !== $return) {
295
			if (true === $echo) {
296
				echo $return;
297
			} else {
298
				return $return;
299
			}
300
		}
301
	}
302
303
	/**
304
	 * Checks to see if an item is checked.
@@ 310-319 (lines=10) @@
307
	 * @param $needle string
308
     * @param $echo bool
309
	 */
310
	public function selected($haystack=false,$needle='',$echo=true) {
311
		$return = $this->itemd($haystack,$needle,'selected');
312
		if('' !== $return) {
313
			if (true === $echo) {
314
				echo $return;
315
			} else {
316
				return $return;
317
			}
318
		}
319
	}
320
321
	/**
322
	 * Checks to see if an item is selected. If $echo is false,  it will return the $type if conditions are true.