Code Duplication    Length = 14-16 lines in 2 locations

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

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

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

@@ 667-682 (lines=16) @@
664
		 *
665
		 * @return int $step on which step doest the import is on.
666
		 */
667
		public function get_step() {
668
			$step    = (int) ( isset( $_REQUEST['step'] ) ? give_clean( $_REQUEST['step'] ) : 0 );
669
			$on_step = 1;
670
671
			if ( empty( $step ) || 1 === $step ) {
672
				$on_step = 1;
673
			} elseif ( $this->check_for_dropdown_or_import() ) {
674
				$on_step = 3;
675
			} elseif ( 2 === $step ) {
676
				$on_step = 2;
677
			} elseif ( 4 === $step ) {
678
				$on_step = 4;
679
			}
680
681
			return $on_step;
682
		}
683
684
		/**
685
		 * Render donations import page