Code Duplication    Length = 23-23 lines in 2 locations

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

@@ 223-245 (lines=23) @@
220
      }
221
    }
222
223
    function getParameters($module) {
224
      $result = array();
225
226
      if ( $module == 'G' ) {
227
        if ( $dir = @dir(DIR_FS_CATALOG . 'includes/apps/braintree/cfg_params/') ) {
228
          while ( $file = $dir->read() ) {
229
            if ( !is_dir(DIR_FS_CATALOG . 'includes/apps/braintree/cfg_params/' . $file) && (substr($file, strrpos($file, '.')) == '.php') ) {
230
              $result[] = 'OSCOM_APP_PAYPAL_BRAINTREE_' . strtoupper(substr($file, 0, strrpos($file, '.')));
231
            }
232
          }
233
        }
234
      } else {
235
        if ( $dir = @dir(DIR_FS_CATALOG . 'includes/apps/braintree/modules/' . $module . '/cfg_params/') ) {
236
          while ( $file = $dir->read() ) {
237
            if ( !is_dir(DIR_FS_CATALOG . 'includes/apps/braintree/modules/' . $module . '/cfg_params/' . $file) && (substr($file, strrpos($file, '.')) == '.php') ) {
238
              $result[] = 'OSCOM_APP_PAYPAL_BRAINTREE_' . $module . '_' . strtoupper(substr($file, 0, strrpos($file, '.')));
239
            }
240
          }
241
        }
242
      }
243
244
      return $result;
245
    }
246
247
    function getInputParameters($module) {
248
      $result = array();

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

@@ 269-291 (lines=23) @@
266
      }
267
    }
268
269
    function getParameters($module) {
270
      $result = array();
271
272
      if ( $module == 'G' ) {
273
        if ( $dir = @dir(DIR_FS_CATALOG . 'includes/apps/paypal/cfg_params/') ) {
274
          while ( $file = $dir->read() ) {
275
            if ( !is_dir(DIR_FS_CATALOG . 'includes/apps/paypal/cfg_params/' . $file) && (substr($file, strrpos($file, '.')) == '.php') ) {
276
              $result[] = 'OSCOM_APP_PAYPAL_' . strtoupper(substr($file, 0, strrpos($file, '.')));
277
            }
278
          }
279
        }
280
      } else {
281
        if ( $dir = @dir(DIR_FS_CATALOG . 'includes/apps/paypal/modules/' . $module . '/cfg_params/') ) {
282
          while ( $file = $dir->read() ) {
283
            if ( !is_dir(DIR_FS_CATALOG . 'includes/apps/paypal/modules/' . $module . '/cfg_params/' . $file) && (substr($file, strrpos($file, '.')) == '.php') ) {
284
              $result[] = 'OSCOM_APP_PAYPAL_' . $module . '_' . strtoupper(substr($file, 0, strrpos($file, '.')));
285
            }
286
          }
287
        }
288
      }
289
290
      return $result;
291
    }
292
293
    function getInputParameters($module) {
294
      $result = array();