Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 760-772 (lines=13) @@
757
      return $result;
758
    }
759
760
    function isWritable($location) {
761
      if ( !file_exists($location) ) {
762
        while ( true ) {
763
          $location = dirname($location);
764
765
          if ( file_exists($location) ) {
766
            break;
767
          }
768
        }
769
      }
770
771
      return is_writable($location);
772
    }
773
774
    function rmdir($dir) {
775
      foreach ( scandir($dir) as $file ) {

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

@@ 814-826 (lines=13) @@
811
      return $result;
812
    }
813
814
    function isWritable($location) {
815
      if ( !file_exists($location) ) {
816
        while ( true ) {
817
          $location = dirname($location);
818
819
          if ( file_exists($location) ) {
820
            break;
821
          }
822
        }
823
      }
824
825
      return is_writable($location);
826
    }
827
828
    function rmdir($dir) {
829
      foreach ( scandir($dir) as $file ) {