Code Duplication    Length = 7-7 lines in 2 locations

includes/class-sensei-settings-api.php 2 locations

@@ 676-682 (lines=7) @@
673
				// Check if the field is valid.
674
				$method = $this->determine_method( $v, 'check' );
675
676
				if ( function_exists ( $method ) ) {
677
					$is_valid = $method( $value );
678
				} else {
679
					if ( method_exists( $this, $method ) ) {
680
						$is_valid = $this->$method( $value );
681
					}
682
				}
683
684
				if ( ! $is_valid ) {
685
					$this->add_error( $k, $v );
@@ 691-697 (lines=7) @@
688
689
				$method = $this->determine_method( $v, 'validate' );
690
691
				if ( function_exists ( $method ) ) {
692
					$options[$k] = $method( $value );
693
				} else {
694
					if ( method_exists( $this, $method ) ) {
695
						$options[$k] = $this->$method( $value );
696
					}
697
				}
698
			}
699
		}
700