Code Duplication    Length = 14-16 lines in 2 locations

includes/admin/tools/import/class-give-import-core-settings.php 1 location

@@ 313-326 (lines=14) @@
310
		 *
311
		 * @return int $step on which step doest the import is on.
312
		 */
313
		public function get_step() {
314
			$step    = (int) ( isset( $_REQUEST['step'] ) ? give_clean( $_REQUEST['step'] ) : 0 );
315
			$on_step = 1;
316
317
			if ( empty( $step ) || 1 === $step ) {
318
				$on_step = 1;
319
			} elseif ( 2 === $step ) {
320
				$on_step = 2;
321
			} elseif ( 3 === $step ) {
322
				$on_step = 3;
323
			}
324
325
			return $on_step;
326
		}
327
328
		/**
329
		 * Render donations import page

includes/admin/tools/import/class-give-import-donations.php 1 location

@@ 764-779 (lines=16) @@
761
		 *
762
		 * @return int $step on which step doest the import is on.
763
		 */
764
		public function get_step() {
765
			$step    = (int) ( isset( $_REQUEST['step'] ) ? give_clean( $_REQUEST['step'] ) : 0 );
766
			$on_step = 1;
767
768
			if ( empty( $step ) || 1 === $step ) {
769
				$on_step = 1;
770
			} elseif ( $this->check_for_dropdown_or_import() ) {
771
				$on_step = 3;
772
			} elseif ( 2 === $step ) {
773
				$on_step = 2;
774
			} elseif ( 4 === $step ) {
775
				$on_step = 4;
776
			}
777
778
			return $on_step;
779
		}
780
781
		/**
782
		 * Render donations import page