Code Duplication    Length = 5-5 lines in 2 locations

src/includes/classes/hook/reaction/validator.php 2 locations

@@ 149-153 (lines=5) @@
146
			$fail_fast = $this->fail_fast;
147
			$this->fail_fast = true;
148
149
			if ( ! isset( $this->event_slug ) ) {
150
				$this->add_error( __( 'Event is missing.', 'wordpoints' ), 'event' );
151
			} elseif ( ! $this->hooks->events->is_registered( $this->event_slug ) ) {
152
				$this->add_error( __( 'Event is invalid.', 'wordpoints' ), 'event' );
153
			}
154
155
			if ( ! isset( $this->reactor_slug ) ) {
156
				$this->add_error( __( 'Reactor is missing.', 'wordpoints' ), 'reactor' );
@@ 155-159 (lines=5) @@
152
				$this->add_error( __( 'Event is invalid.', 'wordpoints' ), 'event' );
153
			}
154
155
			if ( ! isset( $this->reactor_slug ) ) {
156
				$this->add_error( __( 'Reactor is missing.', 'wordpoints' ), 'reactor' );
157
			} elseif ( ! $this->hooks->reactors->is_registered( $this->reactor_slug ) ) {
158
				$this->add_error( __( 'Reactor is invalid.', 'wordpoints' ), 'reactor' );
159
			}
160
161
			// From here on out we can collect errors as they come (unless we are
162
			// supposed to fail fast).