Code Duplication    Length = 5-5 lines in 3 locations

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

@@ 206-210 (lines=5) @@
203
                     'OSCOM_APP_PAYPAL_BRAINTREE_' . $server . 'PUBLIC_KEY',
204
                     'OSCOM_APP_PAYPAL_BRAINTREE_' . $server . 'PRIVATE_KEY');
205
206
      foreach ( $creds as $c ) {
207
        if ( !defined($c) || (strlen(trim(constant($c))) < 1) ) {
208
          return false;
209
        }
210
      }
211
212
      return true;
213
    }

catalog/includes/apps/paypal/OSCOM_PayPal.php 2 locations

@@ 206-210 (lines=5) @@
203
                       'OSCOM_APP_PAYPAL_' . $server . '_API_SIGNATURE');
204
      }
205
206
      foreach ( $creds as $c ) {
207
        if ( !defined($c) || (strlen(trim(constant($c))) < 1) ) {
208
          return false;
209
        }
210
      }
211
212
      return true;
213
    }
@@ 252-256 (lines=5) @@
249
                       'OSCOM_APP_PAYPAL_' . $server . '_API_SIGNATURE');
250
      }
251
252
      foreach ( $creds as $c ) {
253
        if ( !defined($c) || (strlen(trim(constant($c))) < 1) ) {
254
          return false;
255
        }
256
      }
257
258
      return true;
259
    }