Code Duplication    Length = 10-10 lines in 4 locations

catalog/includes/modules/payment/paypal_pro_dp.php 1 location

@@ 517-526 (lines=10) @@
514
      return false;
515
    }
516
517
    function check() {
518
      $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'OSCOM_APP_PAYPAL_DP_STATUS'");
519
      if ( tep_db_num_rows($check_query) ) {
520
        $check = tep_db_fetch_array($check_query);
521
522
        return tep_not_null($check['configuration_value']);
523
      }
524
525
      return false;
526
    }
527
528
    function install() {
529
      tep_redirect(tep_href_link('paypal.php', 'action=configure&subaction=install&module=DP'));

catalog/includes/modules/payment/paypal_standard.php 1 location

@@ 825-834 (lines=10) @@
822
      return false;
823
    }
824
825
    function check() {
826
      $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'OSCOM_APP_PAYPAL_PS_STATUS'");
827
      if ( tep_db_num_rows($check_query) ) {
828
        $check = tep_db_fetch_array($check_query);
829
830
        return tep_not_null($check['configuration_value']);
831
      }
832
833
      return false;
834
    }
835
836
    function install() {
837
      tep_redirect(tep_href_link('paypal.php', 'action=configure&subaction=install&module=PS'));

catalog/includes/modules/payment/paypal_express.php 1 location

@@ 567-576 (lines=10) @@
564
      return false;
565
    }
566
567
    function check() {
568
      $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'OSCOM_APP_PAYPAL_EC_STATUS'");
569
      if ( tep_db_num_rows($check_query) ) {
570
        $check = tep_db_fetch_array($check_query);
571
572
        return tep_not_null($check['configuration_value']);
573
      }
574
575
      return false;
576
    }
577
578
    function install() {
579
      tep_redirect(tep_href_link('paypal.php', 'action=configure&subaction=install&module=EC'));

catalog/includes/modules/payment/paypal_pro_hs.php 1 location

@@ 615-624 (lines=10) @@
612
      return $error;
613
    }
614
615
    function check() {
616
      $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'OSCOM_APP_PAYPAL_HS_STATUS'");
617
      if ( tep_db_num_rows($check_query) ) {
618
        $check = tep_db_fetch_array($check_query);
619
620
        return tep_not_null($check['configuration_value']);
621
      }
622
623
      return false;
624
    }
625
626
    function install() {
627
      tep_redirect(tep_href_link('paypal.php', 'action=configure&subaction=install&module=HS'));