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

@@ 786-801 (lines=16) @@
783
		 *
784
		 * @return int $step on which step doest the import is on.
785
		 */
786
		public function get_step() {
787
			$step    = (int) ( isset( $_REQUEST['step'] ) ? give_clean( $_REQUEST['step'] ) : 0 );
788
			$on_step = 1;
789
790
			if ( empty( $step ) || 1 === $step ) {
791
				$on_step = 1;
792
			} elseif ( $this->check_for_dropdown_or_import() ) {
793
				$on_step = 3;
794
			} elseif ( 2 === $step ) {
795
				$on_step = 2;
796
			} elseif ( 4 === $step ) {
797
				$on_step = 4;
798
			}
799
800
			return $on_step;
801
		}
802
803
		/**
804
		 * Render donations import page