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

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