Code Duplication    Length = 15-15 lines in 2 locations

catalog/includes/apps/braintree/OSCOM_Braintree.php 1 location

@@ 754-768 (lines=15) @@
751
      }
752
    }
753
754
    function getDef($key, $values = null) {
755
      $def = isset($this->_definitions[$key]) ? $this->_definitions[$key] : $key;
756
757
      if ( is_array($values) ) {
758
        $keys = array_keys($values);
759
760
        foreach ( $keys as &$k ) {
761
          $k = ':' . $k;
762
        }
763
764
        $def = str_replace($keys, array_values($values), $def);
765
      }
766
767
      return $def;
768
    }
769
770
    function getDirectoryContents($base, &$result = array()) {
771
      foreach ( scandir($base) as $file ) {

catalog/includes/apps/paypal/OSCOM_PayPal.php 1 location

@@ 806-820 (lines=15) @@
803
      }
804
    }
805
806
    function getDef($key, $values = null) {
807
      $def = isset($this->_definitions[$key]) ? $this->_definitions[$key] : $key;
808
809
      if ( is_array($values) ) {
810
        $keys = array_keys($values);
811
812
        foreach ( $keys as &$k ) {
813
          $k = ':' . $k;
814
        }
815
816
        $def = str_replace($keys, array_values($values), $def);
817
      }
818
819
      return $def;
820
    }
821
822
    function getDirectoryContents($base, &$result = array()) {
823
      foreach ( scandir($base) as $file ) {