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

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