Code Duplication    Length = 7-7 lines in 2 locations

class/DoSync.php 1 location

@@ 146-152 (lines=7) @@
143
            return false;
144
        }
145
        while ($file = readdir($dir_handle)) {
146
            if ('.' != $file && '..' != $file) {
147
                if (!is_dir($dirname . '/' . $file)) {
148
                    unlink($dirname . '/' . $file);
149
                } else {
150
                    $this->SmallworldDeleteDirectory($dirname . '/' . $file);
151
                }
152
            }
153
        }
154
        closedir($dir_handle);
155
        rmdir($dirname);

class/SwDatabase.php 1 location

@@ 566-572 (lines=7) @@
563
            return false;
564
        }
565
        while (false !== ($file = readdir($dir_handle))) {
566
            if ('.' !== $file && '..' !== $file) {
567
                if (!is_dir($dirname . '/' . $file)) {
568
                    unlink($dirname . '/' . $file);
569
                } else {
570
                    $this->SmallworldDeleteDirectory($dirname . '/' . $file);
571
                }
572
            }
573
        }
574
        closedir($dir_handle);
575
        rmdir($dirname);